Package org.microproxy.otel


package org.microproxy.otel
OpenTelemetry for MicroProxy, with no dependencies but the JDK: W3C Trace Context, B3 and Jaeger propagation (Propagators), sampling (Sampler), a SERVER span per exchange and a CLIENT span per attempt to reach the server, INTERNAL spans for tunnels and flows, and OTLP/HTTP export of traces, metrics (the proxy's StatsRegistry) and access logs, as protobuf or JSON (Telemetry). It plugs into the core as its FlowTracer, and into the launcher as --otel (OtelLauncherExtension).
  • Class
    Description
    Adds --otel and its options to the command line when this module is on the class path.
    Reads a trace context from request headers and writes one onto them, in one format: W3C Trace Context (Propagators.TRACE_CONTEXT), B3 in its single-header and multi-header forms (Propagators.B3, Propagators.B3_MULTI) or Jaeger's uber-trace-id (Propagators.JAEGER).
    The propagators, by the names OTEL_PROPAGATORS uses: tracecontext (W3C Trace Context: traceparent and tracestate), b3 (B3's single b3 header), b3multi (B3's X-B3-* headers) and jaeger ( uber-trace-id).
    Decides whether a new trace, or the proxy's part of a trace that came with the request, is sampled: recorded and exported.
    What a propagator carries between processes: a 128-bit trace id, a 64-bit span id, the trace flags (bit 0: sampled) and the W3C tracestate, as OpenTelemetry's SpanContext.
    Bounds on what one span (or log record) keeps, so that attributes a script or a request supplies cannot grow it without limit: past them, attributes and events are dropped and counted as dropped in the export, and longer string values are cut.
    OpenTelemetry for the proxy, with nothing but the JDK: context propagation (W3C Trace Context, and B3 and Jaeger when configured), an X-Request-Id per request, a SERVER span per exchange (HTTP/1, HTTP/2 and HTTP/3) with a CLIENT span per attempt to reach the server, an INTERNAL span per tunnel or flow (CONNECT, SOCKS, WebSocket, CONNECT-UDP, QUIC), and the export over OTLP/HTTP, as protobuf or JSON, of those spans, of the proxy's stats as metrics, and of its access-log records as log records.
    Configures a Telemetry; every setting has OpenTelemetry's default.
    How OTLP is sent: http/protobuf or http/json.
    What happens to a request's X-Request-Id.
    What goes upstream when the proxy strips tracing headers (HttpProxyServerBootstrap.withoutTracingHeadersUpstream()).