Class OtelCollectorClient

java.lang.Object
codes.grow.packages.otelcollector.OtelCollectorClient
All Implemented Interfaces:
AutoCloseable

public final class OtelCollectorClient extends Object implements AutoCloseable
Client for an OpenTelemetry Collector: health (health_check with zpages fallback), an authenticated OTLP ping, the collector version, and factories for the telemetry bootstrap, tracing, log clients and exporters whose lifetime the client owns (close() flushes and shuts them down).

 try (OtelCollectorClient client = OtelCollectorClient.fromEnv()) {
   HealthStatus health = client.health();
   TelemetryHandle telemetry = client.initTelemetry();
 }
 

Every I/O method has a blocking form and an …Async form returning CompletableFuture. Thread-safe.