Uses of Class
org.microproxy.otel.Telemetry.Builder
Packages that use Telemetry.Builder
Package
Description
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).-
Uses of Telemetry.Builder in org.microproxy.otel
Methods in org.microproxy.otel that return Telemetry.BuilderModifier and TypeMethodDescriptionstatic Telemetry.BuilderTelemetry.builder()Returns a builder with the defaults: everything exported tohttp://localhost:4318.Telemetry.Builder.compression(boolean gzip) Gzips the exports (OTEL_EXPORTER_OTLP_COMPRESSION=gzip).Telemetry.Builder.enabled(boolean enabled) Turns everything on (the default) or off; off,Telemetry.install(org.microproxy.HttpProxyServerBootstrap)changes nothing.The collector's OTLP/HTTP base URL; each signal goes to<endpoint>/v1/<signal>.Telemetry.Builder.forceTraceHeader(String header) Samples every request that hasheader, whatever the sampler says (Envoy'sx-envoy-force-trace); none by default.static Telemetry.BuilderTelemetry.fromEnvironment()A builder configured from the process's environment (OTEL_*variables, seeTelemetry.fromEnvironment(Map)).static Telemetry.BuilderTelemetry.fromEnvironment(Map<String, String> env) A builder configured fromenv, OpenTelemetry's environment variables:OTEL_SDK_DISABLED,OTEL_SERVICE_NAME,OTEL_RESOURCE_ATTRIBUTES,OTEL_EXPORTER_OTLP_ENDPOINTandOTEL_EXPORTER_OTLP_{TRACES,METRICS,LOGS}_ENDPOINT,OTEL_EXPORTER_OTLP_PROTOCOL,OTEL_EXPORTER_OTLP_HEADERS,OTEL_EXPORTER_OTLP_COMPRESSION,OTEL_EXPORTER_OTLP_TIMEOUT,OTEL_{TRACES,METRICS,LOGS}_EXPORTER(otlpornone),OTEL_TRACES_SAMPLERandOTEL_TRACES_SAMPLER_ARG,OTEL_PROPAGATORS,OTEL_METRIC_EXPORT_INTERVAL,OTEL_BSP_*andOTEL_BLRP_*(SCHEDULE_DELAY,MAX_QUEUE_SIZE,MAX_EXPORT_BATCH_SIZE), and the span limits (OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT,OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT).Adds a header to every export, such asauthorization.Telemetry.Builder.logFormat(AccessLogFormat format) The body of exported log records: an access-log format; Envoy's default by default.The log record queue (OTEL_BLRP_*): 2048, 512 and 1 s by default.Telemetry.Builder.logs(boolean on) Whether access-log records are exported as log records (OTEL_LOGS_EXPORTER).Telemetry.Builder.logsEndpoint(String url) The URL log records go to, as it is.Telemetry.Builder.metricInterval(Duration interval) How often metrics are exported (OTEL_METRIC_EXPORT_INTERVAL, 60 s).Telemetry.Builder.metricPrefix(String prefix) The prefix of exported metric names; the registry's (envoy) by default.Telemetry.Builder.metrics(boolean on) Whether the proxy's stats are exported as metrics (OTEL_METRICS_EXPORTER).Telemetry.Builder.metricsEndpoint(String url) The URL metrics go to, as it is.Telemetry.Builder.propagators(List<Propagator> propagators) The propagators, as OpenTelemetry's composite propagator: they extract in order, so the last that finds a valid context in a request gives the parent, and all write the proxy's context upstream; W3C Trace Context by default.Telemetry.Builder.protocol(Telemetry.Protocol protocol) How OTLP is sent: protobuf (the default) or JSON.Telemetry.Builder.requestId(Telemetry.RequestIdMode mode) What happens toX-Request-Id: kept, or made when missing (the default), always made, or left alone.Telemetry.Builder.resourceAttribute(String key, String value) A resource attribute (OTEL_RESOURCE_ATTRIBUTES), besidesservice.*,host.name,process.*andtelemetry.sdk.*, which it may override.How failed exports are retried: attempts in all (5 by default), and the backoff between them, growing by half each time frominitial(1 s) up tomax(5 s), with jitter, and never shorter than aRetry-After.The sampler;parentbased_always_onby default.Telemetry.Builder.serviceName(String name) service.name(OTEL_SERVICE_NAME);microproxyby default.Telemetry.Builder.spanLimits(SpanLimits limits) The span limits.The span queue (OTEL_BSP_*): its size (2048), the largest batch (512) and how long a span waits for its batch to fill (5 s).How long one export attempt may take, connecting included (10 seconds by default).Telemetry.Builder.traces(boolean on) Whether spans are exported (OTEL_TRACES_EXPORTER); without them the proxy still propagates.Telemetry.Builder.tracesEndpoint(String url) The URL spans go to, as it is (OTEL_EXPORTER_OTLP_TRACES_ENDPOINT).Telemetry.Builder.trustIncoming(boolean trust) Whether to continue the traces clients send (the default), or start a new trace for every request, as a trust boundary.Telemetry.Builder.whenStripped(Telemetry.WhenStripped mode) What goes upstream when the proxy strips tracing headers: the proxy's own context (the default) or nothing.