hypertrace / hypertrace-collector

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

fix: remove service_name metric label if service.name resource attr exists #111

Closed tim-mwangi closed 1 year ago

tim-mwangi commented 1 year ago

Description

In the most recent otel collector upgrade, service_name is now a metric label. So is service.name resource attribute which is copied over into the metric labels by the metricresourceattrstoattrs processor. However, prometheus exporter sanitizes service.name into service_name resulting into 2 labels with the same name, hence it throws an error about duplicate label names. This is an issue that was previously fixed for service_instance_id.

Testing

Unit tests and local testing.

Checklist: