elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash

Home Page:https://www.elastic.co/products/beats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GCP labels are being omitted

gpop63 opened this issue · comments

When parsing time series objects, we're omitting key labels like instance_id, zone, and project_id.

if k == TimeSeriesResponsePathForECSAvailabilityZone || k == TimeSeriesResponsePathForECSInstanceID || k == TimeSeriesResponsePathForECSAccountID {

This omission seems to be because these are ECS fields. While this is acceptable if the service has metadata, such as compute, it results in missing crucial labels for services without additional metadata logic.

For instance, when fetching the instance/leader_percentage_by_region metric for the spanner service, the instance_id label is missing. This leads to a discrepancy between what we deliver and what users see in the GCP Metrics Explorer.

We need to ensure these ECS fields are included even if the service lacks metadata.

cc: @ishleenk17