envoy
envoy copied to clipboard
OpenTelemetry metrics sink and access logger - Ability to configure OpenTelemetry Resource via Resource Detectors
Title: Support OpenTelemetry Resource detectors for Otel Metrics sink
Description: The OpenTelemetry project defines the concept of a Resource. It is a bag of attributes that can be configured in different ways in OpenTelemetry, via environment variables, explicitly in code or via Resource detectors.
Issue #28929 and its resolution #29547 added support in the OpenTelemetry Tracer configuration for "Resource Detectors".
-
However, the OpenTelemetry Logger implementation, while allowing configurable resource attributes does not support resource detectors.
-
The OpenTelemetry Metrics sink does not seem to support allowing configurable resource attributes - not even
service.name
(please correct me if I'm wrong).
The OpenTelemetry Resource concept applies across all telemetry signals - traces, metrics and logs. It would be great to see if we can unify the different signal types in Envoy such that the OpenTelemetry Resource configuration is specified once, and then inherited by the three different signal generators.
Failing that, at least unifying support for each signal type to be able to specify a set of resource detectors (specifically the Environment Resource Detector which can set resource attributes from environment variables as defined in the OpenTelemetry specification) would greatly help in identifying the metrics and logs as emanating from the same underlying Envoy instance.
Relevant Links: #28929 - Adding Resource Detectors to OpenTelemetry Tracer
cc @alexanderellis @htuch
cc @joaopgrassi
I didn't dig into details of how OTel metrics and logs are collected/recorded in Envoy. This would be another benefit if we would use the OTel SDK in Envoy instead of having a somewhat custom implementation of it.
Having said that, maybe it's possible to "move out" the concept of resource detector from the tracer package/module so other signals can be used? I'm not sure if that's possible..
Yes, ideally there would be some sort of global setting for OpenTelemetry Resource, and the trace/metrics/logging OpenTelemetry exporters would refer to that when initializing themselves, so that the resource information gets associated with each set of outgoing telemetry data.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
@joaopgrassi I think this is still important. Is it possible to label this as help wanted
?
I can't add labels or re-open. @wbpcode l, @phlax can you please reopen? Thank you!