Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x-pack/metricbeat/module/gcp: Add omitted labels #40062

Merged
merged 15 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Normalize AWS RDS CPU Utilization values before making the metadata API call. {pull}39664[39664]
- Fix behavior of pagetypeinfo metrics {pull}39985[39985]
- Fix query logic for temp and non-temp tablespaces in Oracle module. {issue}38051[38051] {pull}39787[39787]
- Fix GCP omitted label-ECSCloud.ECSCloudInstance.ECSCloudInstanceID. {issue}40033[40033] {pull}40062[40062]
gpop63 marked this conversation as resolved.
Show resolved Hide resolved

*Osquerybeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ func (s *StackdriverTimeSeriesMetadataCollector) Metadata(ctx context.Context, i
// common.Mapstr seems to not work as expected when deleting keys so I have to iterate over all results to add
// the ones I want
for k, v := range s.timeSeries.Resource.Labels {

// We are omitting some labels here because they are added separately for services with additional metadata logic.
// However, we explicitly include the instance_id label to ensure it is not missed for services without additional metadata logic.
if k == TimeSeriesResponsePathForECSInstanceID {
_, _ = ecs.Put(ECSCloudInstanceIDKey, v)
Linu-Elias marked this conversation as resolved.
Show resolved Hide resolved
}

if k == TimeSeriesResponsePathForECSAvailabilityZone || k == TimeSeriesResponsePathForECSInstanceID || k == TimeSeriesResponsePathForECSAccountID {
ishleenk17 marked this conversation as resolved.
Show resolved Hide resolved
continue
}
Expand Down
Loading