hypertrace / hypertrace-collector

OpenTelemetry collector distribution for Hypertrace platform
6 stars 5 forks source link

fix: do not copy service.instance.id resource attr if service_instance_id already exists in the metric attrs #83

Closed tim-mwangi closed 2 years ago

tim-mwangi commented 2 years ago

Description

Do not copy service.instance.id resource attr if service_instance_id already exists in the metric attrs. This is because the prometheus exporter will sanitize service.instance.id to become service_instance_id and hence there will be duplicate attributes and that will cause an error when scraping the prometheus metrics. This started happening after upgrading to otel collector v0.49.0

Testing

Unit tests and local testing.

Checklist: