Skip to content

OpenTelemetry Collector SDK

Grow Codes CI License

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 TypeScript coverage
Rust grow-opentelemetry-collector Rust coverage
Go github.com/grow-codes-packages/opentelemetry-collector/go Go coverage
Python grow-opentelemetry-collector Python coverage
Java codes.grow.packages:opentelemetry-collector Java coverage

What you get

  • One-call telemetry: initTelemetry sets 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_* (alias GROW_OTEL_*) and explicit values take precedence (Configuration).
  • Collector health: health_check with a zpages fallback for stock collectors, waitUntilReady, an authenticated ping and 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.