Official Go collector for API Graveyard — automatically tracks your outgoing HTTP dependencies, detects risk events, and surfaces zombie APIs before they take down your product.
go get github.com/Shakargy/api-graveyard-gopackage main
import (
ag "github.com/Shakargy/api-graveyard-go"
)
func main() {
ag.Init(ag.Options{
APIKey: "agk_your_key_here",
ProjectID: "your-project-id",
})
defer ag.Shutdown()
// ... rest of your app
// All outgoing http.DefaultTransport calls are now tracked automatically.
}That's it. Every outgoing HTTP request made via the standard net/http client is automatically captured, batched, and sent to API Graveyard in the background.
ag.Init(ag.Options{
APIKey: os.Getenv("API_GRAVEYARD_KEY"),
ProjectID: os.Getenv("API_GRAVEYARD_PROJECT_ID"),
ServiceName: "my-backend",
Environment: os.Getenv("APP_ENV"), // "production", "staging", etc.
FlushInterval: 10, // seconds
MaxBatchSize: 100,
Debug: false,
})| Option | Type | Default | Description |
|---|---|---|---|
APIKey |
string |
required | Your agk_... API key from the dashboard |
ProjectID |
string |
required | Your project ID from the dashboard |
BaseURL |
string |
https://api-graveyard.com |
Override for self-hosted |
ServiceName |
string |
"" |
Tag events with a service name |
Environment |
string |
"production" |
Tag events with an environment |
FlushInterval |
int |
10 |
How often to flush the event buffer (seconds) |
MaxBatchSize |
int |
100 |
Max events per batch before forcing a flush |
Debug |
bool |
false |
Log flush activity |
- Method, URL, HTTP status code, response time
- Timestamp of each request
- Service name and environment (if configured)
Requests to api-graveyard.com itself are never captured to avoid infinite loops.
Localhost and 127.0.0.1 requests are ignored by default.
- Sign up at api-graveyard.com
- Create a project
- Go to Settings → Integrations and create an API key
MIT