Go
Trace Go services with the LogDrop Go package.
LogDrop traces Go services with the LogDrop Go package. A Go binary cannot load an agent at run time, so your service adds the package, starts it in main and wraps the libraries it uses, one line each. On Kubernetes, one pod annotation then gives it its settings.
The package is OpenTelemetry Go with LogDrop's pipeline. It records the requests your service handles and its calls to databases, caches, message brokers and other services, removes everything that could carry personal or secret data, and sends the spans to LogDrop over HTTPS with a traces ingest key. It removes the same data as the Java, Node.js, Python and .NET agents, so a request that crosses services in these languages appears as one trace.
Current release: LogDrop Go package 0.1.0-alpha2 (the Go module github.com/initialcodess/LogDrop-Go-Agent v0.1.0-alpha2) and Helm chart logdrop-infrastructure 0.1.1-alpha15.
Requirements
Before you add the package, check that you have the LogDrop project and key, and that your platform, Go version and libraries are supported.
- The project, the traces ingest key and the endpoint from Before you start.
- Go 1.26 or newer (OpenTelemetry Go 1.47 needs it).
- On Kubernetes: Kubernetes 1.28 or newer with Helm 3.8 or newer. Go services run on any node architecture: there is no agent image.
- Traced libraries, one line each (Add the package):
net/http(server and client, including chi and gorilla/mux), Gin, Echo v4 and v5, gRPC,database/sql(PostgreSQL, MySQL, SQL Server, SQLite and other drivers), pgx v5, go-redis v9, Kafka (segmentio/kafka-go) and RabbitMQ (amqp091-go). - Not supported: a service that sets up its own OpenTelemetry tracer provider. The package then stays off and says so; the service runs untraced.
Set it up
Add the package to your service first. Then give it its settings with the guide for where the service runs: on Kubernetes through the LogDrop chart and one pod annotation, elsewhere through environment variables.
Add the package
go get, logdrop.Start in main and one line per traced library.
Kubernetes
Install the LogDrop Helm chart; one pod annotation gives the service its settings.
Other hosts
Virtual machines, Docker and other platforms: set the settings as environment variables.
Reference
These pages hold the details behind the set-up guides. Use them to add your own spans, change a setting, plan for limits or fix a problem.
Custom spans
Add spans for business operations.
Settings
Every LOGDROP_* setting, its default and its range.
Limits
What LogDrop accepts per request, per key and per project.
Rotate the ingest key
Replace a key without losing traces.
What LogDrop records
The data a span carries, and what never leaves your service.
Verify what you install
How Go checks the module, and the signature of the chart.
Licences
The licence of the package and of what it uses.
Troubleshooting
Package messages and what to do about them.
.png)