OpenTelemetry Collector SDK¶
One API for OpenTelemetry Collector in five languages: TypeScript, Rust, Go, Python and Java. Every package
has the same functions, options, defaults, error codes and behaviour, tested against a real
otel/opentelemetry-collector-contrib:0.165.0 in Docker.
| Language | Package | Coverage |
|---|---|---|
| TypeScript | @grow-codes/opentelemetry-collector |
|
| Rust | grow-opentelemetry-collector |
|
| Go | github.com/grow-codes-packages/opentelemetry-collector/go |
|
| Python | grow-opentelemetry-collector |
|
| Java | codes.grow.packages:opentelemetry-collector |
What you get¶
- One-call telemetry:
initTelemetrysets up traces, logs and metrics over OTLP (gRPC or HTTP/protobuf) on the official OpenTelemetry SDK, with one resource (host, process, container, Kubernetes) — the generic package for every Grow stack, since the platform deploys the collector with each one (One-call telemetry). - Standard configuration: the
OTEL_*variables work unchanged;GROW_OPENTELEMETRY_COLLECTOR_*(aliasGROW_OTEL_*) and explicit values take precedence (Configuration). - Collector health:
health_checkwith a zpages fallback for stock collectors,waitUntilReady, an authenticatedpingand the collector version (Client and health). - Logs through a batching OTLP log client with a logger facade, redaction and framework adapters (Logs, Logging).
- Metrics helpers (
meter,counter,upDownCounter,histogram,gauge) and runtime metrics (Metrics). - Tracing setup with collector defaults, span helpers, propagation and framework adapters (Tracing setup, Tracing).
- Typed errors with one set of codes across languages, OTLP and gRPC statuses mapped
(Error handling); redaction everywhere: header credentials never appear in errors,
logs, hooks or
toString(Redaction).
Start with Install and the Quickstart.
Independent project
This SDK is made by Grow Codes. OpenTelemetry Collector is a trademark of its owner (The Linux Foundation (OpenTelemetry is a CNCF project)); this project is not affiliated with or endorsed by it. See License & disclaimer.