feat!: migrate metrics/tracing pipeline to OpenTelemetry SDK#679
Closed
icco wants to merge 4 commits into
Closed
Conversation
Adds a new optional metrics integration that exports the Relay Proxy's existing OpenCensus stats views and trace spans via OTLP, using the official go.opentelemetry.io/otel/bridge/opencensus bridge. The exporter sits alongside the existing Datadog, Stackdriver, and Prometheus exporters and can be enabled with USE_OPENTELEMETRY=true. gRPC (default) and HTTP/protobuf transports are both supported, and the standard OTEL_EXPORTER_OTLP_* environment variables are honored. Closes launchdarkly#582.
Replaces the three OpenCensus exporter modules with native OpenTelemetry SDK exporters and unifies them under a single MeterProvider and TracerProvider. The deprecated dependencies DataDog/opencensus-go-exporter-datadog, launchdarkly/opencensus-go-exporter-stackdriver, and contrib.go.opencensus.io/exporter/prometheus have all been removed. - Datadog: ships metrics and traces via OTLP gRPC into the local Datadog Agent's OTLP receiver (requires Agent v7.43+ with otlp_config enabled). DATADOG_TRACE_ADDR is now the OTLP endpoint; DATADOG_STATS_ADDR is logged as deprecated and ignored. Tags become OpenTelemetry resource attributes. - Stackdriver: uses the official Google Cloud OpenTelemetry exporters for metrics and traces. - Prometheus: backed by go.opentelemetry.io/otel/exporters/prometheus on the same /metrics endpoint and port. The OpenCensus-to-OpenTelemetry bridge is installed once at startup so that Relay's existing OpenCensus-based instrumentation continues to feed every configured backend with no behavioral change. Adds otelmux middleware on the gorilla/mux router so every inbound request produces an OpenTelemetry span named after the matched route template. BREAKING CHANGE: Datadog deployments must now run a local Datadog Agent v7.43+ with the OTLP receiver enabled. See docs/metrics.md for migration notes for each backend.
Updated breaking change notes for Relay Proxy version 9 regarding the OpenTelemetry SDK and removal of OpenCensus exporters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.