diff --git a/modules/otel-collector-components.adoc b/modules/otel-collector-components.adoc index 2b8452d259..fc922f2fb3 100644 --- a/modules/otel-collector-components.adoc +++ b/modules/otel-collector-components.adoc @@ -651,6 +651,46 @@ The Debug exporter prints traces and metrics to the standard output. ---- <1> Verbosity of the debug export: `detailed` or `normal` or `basic`. When set to `detailed`, pipeline data is verbosely logged. Defaults to `normal`. +[id="load-balancing-exporter_{context}"] +=== Load Balancing Exporter + +The Load Balancing Exporter consistently exports spans, metrics, and logs according to the `routing_key` configuration. + +:FeatureName: The Load Balancing Exporter +include::snippets/technology-preview.adoc[leveloffset=+1] + +.OpenTelemetry Collector custom resource with an enabled Load Balancing Exporter +[source,yaml] +---- +# ... + config: | + exporters: + loadbalancing: + routing_key: "service" # <1> + protocol: + otlp: # <2> + timeout: 1s + resolver: # <3> + static: # <4> + hostnames: + - backend-1:4317 + - backend-2:4317 + dns: # <5> + hostname: otelcol-headless.observability.svc.cluster.local + k8s: # <6> + service: lb-svc.kube-public + ports: + - 15317 + - 16317 +# ... +---- +<1> The `routing_key: service` exports spans for the same service name to the same Collector instance to provide accurate aggregation. The `routing_key: traceID` exports spans based on their `traceID`. The implicit default is `traceID` based routing. +<2> The OTLP is the only supported load-balancing protocol. All options of the OTLP exporter are supported. +<3> You can configure only one resolver. +<4> The static resolver distributes the load across the listed endpoints. +<5> You can use the DNS resolver only with a Kubernetes headless service. +<6> The Kubernetes resolver is recommended. + [id="prometheus-exporter_{context}"] === Prometheus exporter