GoogleCloudPlatform / opentelemetry-operations-go

Apache License 2.0
127 stars 99 forks source link

GMP exporter should deduplicate resources when writing target_info #834

Closed dashpole closed 2 months ago

dashpole commented 2 months ago

When using the hostmetrics receiver, each scraper seems to emit metrics under its own resource, which causes DuplicateTimeseries errors when using the GMP exporter, as each resource is turned into its own target_info metric. Since metrics all come from the same host, they all collide.

The exporter should handle cases like these by deduplicating resource or target_info metrics.

dashpole commented 2 months ago

To work around the Duplicate Timeseries error, use this config:

      googlemanagedprometheus:
        metric:
          extra_metrics_config:
            enable_target_info: false
dashpole commented 2 months ago

We should deduplicate scope as well.