Closed tim-mwangi closed 1 year ago
cc @Aneurysm9 as code owner
Pinging code owners: @Aneurysm9. See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
See also #14900.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been closed as inactive because it has been stale for 120 days with no activity.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been closed as inactive because it has been stale for 120 days with no activity.
Describe the bug Since in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9115 we are now adding
job
andinstance
labels based on service name(and namespace if present) and service instance id in the resource attributes respectively, setting resource_to_telemetry_conversion enabled config to true would copy already existingjob
andinstance
resource attributes into metric datapoint attributes and hence cause duplicates when the code in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9115 is executed.When I stepped through using a debugger the duplicates were on
job
for my test scenario. When I set resource_to_telemetry_conversion enabled config to false there are no errors but of course I miss out on having the resource attributes copied over to the metric datapoint attributes. Here's an example of the metrics coming in to the collector.Steps to reproduce Our setup chains 2 open-telemetry collectors: let's call them A and B where A sends both traces and metrics to B via the otlp exporter. A has enabled the prometheus receiver and on it gets the internal open-telemetry collector metrics and puts them on its pipeline and eventually exports them to B via otlp. B has turned on the prometheus exporter with resource_to_telemetry_conversion enabled config set to true
These metrics have
job
andinstance
added as resource attributes. This is our setup but it is easy to replicate by just having metrics coming into the exporter that have these resource attributes and setting resource_to_telemetry_conversion enabled config to true.What did you expect to see? Metrics to be successfully scraped by the prometheus server and no error logs.
What did you see instead? Metrics were not scraped and these error logs continuously logging:
What version did you use? Version: v0.49.0 Open telemetry collector version: v0.49.0 Prometheus server version: v2.36.0
What config did you use? open-telemetry collector config
prometheus config:
Environment OS: Mac OS X 12.3.1(Intel), gcr.io/distroless/base based image as well Compiler(if manually compiled): go 1.17 used to compile our open-telemetry collector.
Additional context Add any other context about the problem here.