Collect traces, logs, and metrics from any application. Zero runtime dependencies, pluggable exporters, and configurable pipeline routing.
Under 8MB binary. No runtime dependencies. Negligible CPU usage even at 100K events/sec.
Route telemetry data to OTLP, Jaeger, Zipkin, or custom backends. Fan-out, filter, and transform in-flight.
Traces, logs, and metrics through a single agent. One config file, one binary, one deployment.
package main
import (
"context"
"log"
"github.com/telemetrylane/agent"
)
func main() {
// Initialize the agent with default configuration
a, err := agent.Init(agent.Config{
ServiceName: "my-service",
Exporter: "otlp",
})
if err != nil {
log.Fatal(err)
}
defer a.Shutdown(context.Background())
// Emit a trace span
ctx, span := a.Trace(context.Background(), "handle-request")
defer span.End()
// Log within the trace context
a.Log(ctx, agent.Info, "processing request", "user_id", "u-1234")
// Record a metric
a.Metric("requests_handled", 1, agent.Tag("method", "GET"))
}