Accepts a OtelCollectorConfig or plain options.
The health client (health_check extension with zpages fallback).
Flushes and shuts down every handle, log client and exporter this client created, then releases connections. Idempotent.
Unauthenticated health: GET {healthUrl} (port 13133), falling back to zpages when the
health endpoint is unreachable. Never throws for an unhealthy or unreachable collector.
initTelemetry with this client's config; close() shuts the handle down.
initTracing with this client's config as defaults; close() shuts it down.
An OTLP LogClient; close() flushes and closes it.
A bare OTLP log exporter for this config; close() shuts it down.
Log query client: the collector has none, every method throws UnsupportedError.
Authenticated round trip: an empty OTLP trace export (creates no telemetry) with the
configured headers — POST {tracesUrl} with {} (HTTP) or TraceService/Export with an
empty message to endpointFor("traces") (gRPC). Returns the latency in ms. AuthenticationError on 401 / gRPC
UNAUTHENTICATED, PermissionDeniedError on 403, NotFoundError for a wrong path.
Collector version from zpages /debug/servicez (works on stock stacks), else target_info
at telemetryUrl; UnsupportedError when neither is reachable.
Trace query client: the collector has none, every method throws UnsupportedError.
Polls health until healthy; TimeoutError after timeoutMs (default 30 000).
OptionaltimeoutMs: numberStaticfromBuilds a client from GROW_OPENTELEMETRY_COLLECTOR_*, GROW_OTEL_* and the standard
OTEL_* variables (see OtelCollectorConfig.fromEnv).
Client for an OpenTelemetry Collector.