Skip to content

Commit

Permalink
fix(logging): remove instance_name resource label (#5461)
Browse files Browse the repository at this point in the history
GCE instance resource labels are aligned with
https://cloud.google.com/monitoring/api/resources#tag_gce_instance
  • Loading branch information
minherz authored Feb 8, 2022
1 parent 38d03be commit 115385f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions logging/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,12 @@ func detectGCEResource() *mrpb.MonitoredResource {
if err != nil {
return nil
}
name, err := metadata.InstanceName()
if err != nil {
return nil
}
return &mrpb.MonitoredResource{
Type: "gce_instance",
Labels: map[string]string{
"project_id": projectID,
"instance_id": id,
"instance_name": name,
"zone": zone,
"project_id": projectID,
"instance_id": id,
"zone": zone,
},
}
}
Expand Down

0 comments on commit 115385f

Please sign in to comment.