stat_sinks: add OTLP/HTTP exporter to OpenTelemetry metrics sink#43001
stat_sinks: add OTLP/HTTP exporter to OpenTelemetry metrics sink#43001wbpcode merged 6 commits intoenvoyproxy:mainfrom
Conversation
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
b1f0e6e to
c2b9d16
Compare
|
assign to @yanavlasov and @wbpcode , since you reviewed the related PR (#42445) in the past |
yanavlasov
left a comment
There was a problem hiding this comment.
Looks good to me. Will wait for API review.
/wait-any
|
@wbpcode you mind doing an api review? |
Adds HTTP transport support to the OpenTelemetry metrics sink, complementing envoyproxy#42445 (OTLP/HTTP access logs) and envoyproxy#29207 (OTLP/HTTP tracing. This enables direct OTLP metrics export to backends that only accept HTTP (Dynatrace, Datadog, Elastic), without requiring an intermediate collector sidecar. - Add field to oneof - Create abstract base class - Rename to EOF ) Signed-off-by: Adrian Cole <[email protected]>
c2b9d16 to
2847275
Compare
|
@codefromthecrypt can you merge main to see if CI permafail will get resolved, please? |
|
/wait |
Signed-off-by: Adrian Cole <[email protected]>
|
🤞 |
Signed-off-by: code <[email protected]>
|
cc @yanavlasov ping for final check of code or merge :) |
|
Seems no code change after last review of @yanavlasov , will merge this. |
|
@codefromthecrypt please merge main and reupload. |
Signed-off-by: code <[email protected]>
|
pray for ci |
|
@wbpcode was this supposed to auto-merge? |
… stat-sinks-otlp-http
Signed-off-by: wbpcode/wangbaiping <[email protected]>
…oyproxy#43001) **Additional Description**: Adds HTTP transport support to the OpenTelemetry metrics sink, complementing envoyproxy#42445 (OTLP/HTTP access logs) and envoyproxy#29207 (OTLP/HTTP tracing). This enables direct OTLP metrics export to backends that only accept HTTP (Dynatrace, Datadog, Elastic), without requiring an intermediate collector sidecar. Also refactors the exporter to use an abstract base class: - Add `http_service` field to `protocol_specifier` oneof for OTLP/HTTP transport - Create abstract `OtlpMetricsExporter` base class - Rename `OpenTelemetryGrpcSink` to `OpenTelemetrySink` with generic exporter **Risk Level**: Low (new optional feature, backward compatible) **Testing**: Unit tests, integration test, manual testing with OTel collector **Docs Changes**: Proto documentation updated **Release Notes**: Added **Example Configuration (OTLP/HTTP)** ```yaml stats_sinks: - name: envoy.stat_sinks.open_telemetry typed_config: "@type": type.googleapis.com/envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig http_service: http_uri: uri: "http://localhost:4318/v1/metrics" cluster: otel_collector timeout: 1s report_counters_as_deltas: true report_histograms_as_deltas: true emit_tags_as_attributes: true use_tag_extracted_name: true ``` **Example Configuration (OTLP/gRPC - unchanged)** ```yaml stats_sinks: - name: envoy.stat_sinks.open_telemetry typed_config: "@type": type.googleapis.com/envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig grpc_service: envoy_grpc: cluster_name: otel_collector report_counters_as_deltas: true ``` Screenshot of metrics from http transport in otel-tui <img width="1288" height="734" alt="Screenshot 2026-01-14 at 8 46 27 PM" src="https://github.com/user-attachments/assets/49d57f12-61a4-4b0d-9dbc-8b9ad3339554" /> --------- Signed-off-by: Adrian Cole <[email protected]> Signed-off-by: Adrian Cole <[email protected]> Signed-off-by: code <[email protected]> Signed-off-by: wbpcode/wangbaiping <[email protected]> Co-authored-by: code <[email protected]>
…oyproxy#43001) **Additional Description**: Adds HTTP transport support to the OpenTelemetry metrics sink, complementing envoyproxy#42445 (OTLP/HTTP access logs) and envoyproxy#29207 (OTLP/HTTP tracing). This enables direct OTLP metrics export to backends that only accept HTTP (Dynatrace, Datadog, Elastic), without requiring an intermediate collector sidecar. Also refactors the exporter to use an abstract base class: - Add `http_service` field to `protocol_specifier` oneof for OTLP/HTTP transport - Create abstract `OtlpMetricsExporter` base class - Rename `OpenTelemetryGrpcSink` to `OpenTelemetrySink` with generic exporter **Risk Level**: Low (new optional feature, backward compatible) **Testing**: Unit tests, integration test, manual testing with OTel collector **Docs Changes**: Proto documentation updated **Release Notes**: Added **Example Configuration (OTLP/HTTP)** ```yaml stats_sinks: - name: envoy.stat_sinks.open_telemetry typed_config: "@type": type.googleapis.com/envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig http_service: http_uri: uri: "http://localhost:4318/v1/metrics" cluster: otel_collector timeout: 1s report_counters_as_deltas: true report_histograms_as_deltas: true emit_tags_as_attributes: true use_tag_extracted_name: true ``` **Example Configuration (OTLP/gRPC - unchanged)** ```yaml stats_sinks: - name: envoy.stat_sinks.open_telemetry typed_config: "@type": type.googleapis.com/envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig grpc_service: envoy_grpc: cluster_name: otel_collector report_counters_as_deltas: true ``` Screenshot of metrics from http transport in otel-tui <img width="1288" height="734" alt="Screenshot 2026-01-14 at 8 46 27 PM" src="https://github.com/user-attachments/assets/49d57f12-61a4-4b0d-9dbc-8b9ad3339554" /> --------- Signed-off-by: Adrian Cole <[email protected]> Signed-off-by: Adrian Cole <[email protected]> Signed-off-by: code <[email protected]> Signed-off-by: wbpcode/wangbaiping <[email protected]> Co-authored-by: code <[email protected]> Signed-off-by: Gustavo <[email protected]>
Additional Description: Adds HTTP transport support to the OpenTelemetry metrics sink, complementing #42445 (OTLP/HTTP access logs) and #29207 (OTLP/HTTP tracing). This enables direct OTLP metrics export to backends that only accept HTTP (Dynatrace, Datadog, Elastic), without requiring an intermediate collector sidecar.
Also refactors the exporter to use an abstract base class:
http_servicefield toprotocol_specifieroneof for OTLP/HTTP transportOtlpMetricsExporterbase classOpenTelemetryGrpcSinktoOpenTelemetrySinkwith generic exporterRisk Level: Low (new optional feature, backward compatible)
Testing: Unit tests, integration test, manual testing with OTel collector
Docs Changes: Proto documentation updated
Release Notes: Added
Example Configuration (OTLP/HTTP)
Example Configuration (OTLP/gRPC - unchanged)
Screenshot of metrics from http transport in otel-tui