diff --git a/.chloggen/gcp-gce-mig.yaml b/.chloggen/gcp-gce-mig.yaml new file mode 100644 index 000000000000..7bf3638381a0 --- /dev/null +++ b/.chloggen/gcp-gce-mig.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: resourcedetectionprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: The `gcp` resource detector will now detect resource attributes identifying a GCE instance's managed instance group. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36142] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/processor/resourcedetectionprocessor/internal/gcp/documentation.md b/processor/resourcedetectionprocessor/internal/gcp/documentation.md index a8a9d0b2b4a0..8e1a3a45d4f4 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/documentation.md +++ b/processor/resourcedetectionprocessor/internal/gcp/documentation.md @@ -21,6 +21,9 @@ | gcp.cloud_run.job.task_index | The Job execution task index | Any Str | true | | gcp.gce.instance.hostname | The hostname of the GCE instance. | Any Str | false | | gcp.gce.instance.name | The name of the GCE instance. | Any Str | false | +| gcp.gce.instance_group_manager.name | The name of an instanceGroupManager. | Any Str | true | +| gcp.gce.instance_group_manager.region | The region of a regional instanceGroupManager. | Any Str | true | +| gcp.gce.instance_group_manager.zone | The zone of a zonal instanceGroupManager. | Any Str | true | | host.id | The host.id | Any Str | true | | host.name | The host.name | Any Str | true | | host.type | The host.type | Any Str | true | diff --git a/processor/resourcedetectionprocessor/internal/gcp/gcp.go b/processor/resourcedetectionprocessor/internal/gcp/gcp.go index 7a49da1702a1..02f612952786 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/gcp.go +++ b/processor/resourcedetectionprocessor/internal/gcp/gcp.go @@ -153,6 +153,7 @@ func (d *detector) Detect(context.Context) (resource pcommon.Resource, schemaURL d.rb.SetFromCallable(d.rb.SetHostName, d.detector.GCEHostName), d.rb.SetFromCallable(d.rb.SetGcpGceInstanceHostname, d.detector.GCEInstanceHostname), d.rb.SetFromCallable(d.rb.SetGcpGceInstanceName, d.detector.GCEInstanceName), + d.rb.SetManagedInstanceGroup(d.detector.GCEManagedInstanceGroup), ) default: // We don't support this platform yet, so just return with what we have diff --git a/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go b/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go index 8574a6250eb2..6efec31368f3 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go +++ b/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go @@ -141,6 +141,37 @@ func TestDetect(t *testing.T) { "gcp.gce.instance.name": "my-gke-node-1234", }, }, + { + desc: "GCE with MIG", + detector: newTestDetector(&fakeGCPDetector{ + projectID: "my-project", + cloudPlatform: gcp.GCE, + gceHostID: "1472385723456792345", + gceHostName: "my-gke-node-1234", + gceHostType: "n1-standard1", + gceAvailabilityZone: "us-central1-c", + gceRegion: "us-central1", + gcpGceInstanceHostname: "custom.dns.example.com", + gcpGceInstanceName: "my-gke-node-1234", + gcpGceManagedInstanceGroup: gcp.ManagedInstanceGroup{ + Name: "my-gke-node", + Location: "us-central1", + Type: gcp.Region, + }, + }), + expectedResource: map[string]any{ + conventions.AttributeCloudProvider: conventions.AttributeCloudProviderGCP, + conventions.AttributeCloudAccountID: "my-project", + conventions.AttributeCloudPlatform: conventions.AttributeCloudPlatformGCPComputeEngine, + conventions.AttributeHostID: "1472385723456792345", + conventions.AttributeHostName: "my-gke-node-1234", + conventions.AttributeHostType: "n1-standard1", + conventions.AttributeCloudRegion: "us-central1", + conventions.AttributeCloudAvailabilityZone: "us-central1-c", + "gcp.gce.instance_group_manager.name": "my-gke-node", + "gcp.gce.instance_group_manager.region": "us-central1", + }, + }, { desc: "Cloud Run", detector: newTestDetector(&fakeGCPDetector{ @@ -456,6 +487,7 @@ type fakeGCPDetector struct { gcpCloudRunJobTaskIndex string gcpGceInstanceName string gcpGceInstanceHostname string + gcpGceManagedInstanceGroup gcp.ManagedInstanceGroup gcpBareMetalSolutionInstanceID string gcpBareMetalSolutionCloudRegion string gcpBareMetalSolutionProjectID string @@ -622,6 +654,13 @@ func (f *fakeGCPDetector) GCEInstanceHostname() (string, error) { return f.gcpGceInstanceHostname, nil } +func (f *fakeGCPDetector) GCEManagedInstanceGroup() (gcp.ManagedInstanceGroup, error) { + if f.err != nil { + return gcp.ManagedInstanceGroup{}, f.err + } + return f.gcpGceManagedInstanceGroup, nil +} + func (f *fakeGCPDetector) BareMetalSolutionInstanceID() (string, error) { if f.err != nil { return "", f.err diff --git a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config.go b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config.go index 7753a7be6717..702430bd2245 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config.go +++ b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config.go @@ -27,23 +27,26 @@ func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { // ResourceAttributesConfig provides config for resourcedetectionprocessor/gcp resource attributes. type ResourceAttributesConfig struct { - CloudAccountID ResourceAttributeConfig `mapstructure:"cloud.account.id"` - CloudAvailabilityZone ResourceAttributeConfig `mapstructure:"cloud.availability_zone"` - CloudPlatform ResourceAttributeConfig `mapstructure:"cloud.platform"` - CloudProvider ResourceAttributeConfig `mapstructure:"cloud.provider"` - CloudRegion ResourceAttributeConfig `mapstructure:"cloud.region"` - FaasID ResourceAttributeConfig `mapstructure:"faas.id"` - FaasInstance ResourceAttributeConfig `mapstructure:"faas.instance"` - FaasName ResourceAttributeConfig `mapstructure:"faas.name"` - FaasVersion ResourceAttributeConfig `mapstructure:"faas.version"` - GcpCloudRunJobExecution ResourceAttributeConfig `mapstructure:"gcp.cloud_run.job.execution"` - GcpCloudRunJobTaskIndex ResourceAttributeConfig `mapstructure:"gcp.cloud_run.job.task_index"` - GcpGceInstanceHostname ResourceAttributeConfig `mapstructure:"gcp.gce.instance.hostname"` - GcpGceInstanceName ResourceAttributeConfig `mapstructure:"gcp.gce.instance.name"` - HostID ResourceAttributeConfig `mapstructure:"host.id"` - HostName ResourceAttributeConfig `mapstructure:"host.name"` - HostType ResourceAttributeConfig `mapstructure:"host.type"` - K8sClusterName ResourceAttributeConfig `mapstructure:"k8s.cluster.name"` + CloudAccountID ResourceAttributeConfig `mapstructure:"cloud.account.id"` + CloudAvailabilityZone ResourceAttributeConfig `mapstructure:"cloud.availability_zone"` + CloudPlatform ResourceAttributeConfig `mapstructure:"cloud.platform"` + CloudProvider ResourceAttributeConfig `mapstructure:"cloud.provider"` + CloudRegion ResourceAttributeConfig `mapstructure:"cloud.region"` + FaasID ResourceAttributeConfig `mapstructure:"faas.id"` + FaasInstance ResourceAttributeConfig `mapstructure:"faas.instance"` + FaasName ResourceAttributeConfig `mapstructure:"faas.name"` + FaasVersion ResourceAttributeConfig `mapstructure:"faas.version"` + GcpCloudRunJobExecution ResourceAttributeConfig `mapstructure:"gcp.cloud_run.job.execution"` + GcpCloudRunJobTaskIndex ResourceAttributeConfig `mapstructure:"gcp.cloud_run.job.task_index"` + GcpGceInstanceHostname ResourceAttributeConfig `mapstructure:"gcp.gce.instance.hostname"` + GcpGceInstanceName ResourceAttributeConfig `mapstructure:"gcp.gce.instance.name"` + GcpGceInstanceGroupManagerName ResourceAttributeConfig `mapstructure:"gcp.gce.instance_group_manager.name"` + GcpGceInstanceGroupManagerRegion ResourceAttributeConfig `mapstructure:"gcp.gce.instance_group_manager.region"` + GcpGceInstanceGroupManagerZone ResourceAttributeConfig `mapstructure:"gcp.gce.instance_group_manager.zone"` + HostID ResourceAttributeConfig `mapstructure:"host.id"` + HostName ResourceAttributeConfig `mapstructure:"host.name"` + HostType ResourceAttributeConfig `mapstructure:"host.type"` + K8sClusterName ResourceAttributeConfig `mapstructure:"k8s.cluster.name"` } func DefaultResourceAttributesConfig() ResourceAttributesConfig { @@ -87,6 +90,15 @@ func DefaultResourceAttributesConfig() ResourceAttributesConfig { GcpGceInstanceName: ResourceAttributeConfig{ Enabled: false, }, + GcpGceInstanceGroupManagerName: ResourceAttributeConfig{ + Enabled: true, + }, + GcpGceInstanceGroupManagerRegion: ResourceAttributeConfig{ + Enabled: true, + }, + GcpGceInstanceGroupManagerZone: ResourceAttributeConfig{ + Enabled: true, + }, HostID: ResourceAttributeConfig{ Enabled: true, }, diff --git a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config_test.go b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config_test.go index f1f98b93018c..fa49017971fe 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config_test.go +++ b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_config_test.go @@ -24,45 +24,51 @@ func TestResourceAttributesConfig(t *testing.T) { { name: "all_set", want: ResourceAttributesConfig{ - CloudAccountID: ResourceAttributeConfig{Enabled: true}, - CloudAvailabilityZone: ResourceAttributeConfig{Enabled: true}, - CloudPlatform: ResourceAttributeConfig{Enabled: true}, - CloudProvider: ResourceAttributeConfig{Enabled: true}, - CloudRegion: ResourceAttributeConfig{Enabled: true}, - FaasID: ResourceAttributeConfig{Enabled: true}, - FaasInstance: ResourceAttributeConfig{Enabled: true}, - FaasName: ResourceAttributeConfig{Enabled: true}, - FaasVersion: ResourceAttributeConfig{Enabled: true}, - GcpCloudRunJobExecution: ResourceAttributeConfig{Enabled: true}, - GcpCloudRunJobTaskIndex: ResourceAttributeConfig{Enabled: true}, - GcpGceInstanceHostname: ResourceAttributeConfig{Enabled: true}, - GcpGceInstanceName: ResourceAttributeConfig{Enabled: true}, - HostID: ResourceAttributeConfig{Enabled: true}, - HostName: ResourceAttributeConfig{Enabled: true}, - HostType: ResourceAttributeConfig{Enabled: true}, - K8sClusterName: ResourceAttributeConfig{Enabled: true}, + CloudAccountID: ResourceAttributeConfig{Enabled: true}, + CloudAvailabilityZone: ResourceAttributeConfig{Enabled: true}, + CloudPlatform: ResourceAttributeConfig{Enabled: true}, + CloudProvider: ResourceAttributeConfig{Enabled: true}, + CloudRegion: ResourceAttributeConfig{Enabled: true}, + FaasID: ResourceAttributeConfig{Enabled: true}, + FaasInstance: ResourceAttributeConfig{Enabled: true}, + FaasName: ResourceAttributeConfig{Enabled: true}, + FaasVersion: ResourceAttributeConfig{Enabled: true}, + GcpCloudRunJobExecution: ResourceAttributeConfig{Enabled: true}, + GcpCloudRunJobTaskIndex: ResourceAttributeConfig{Enabled: true}, + GcpGceInstanceHostname: ResourceAttributeConfig{Enabled: true}, + GcpGceInstanceName: ResourceAttributeConfig{Enabled: true}, + GcpGceInstanceGroupManagerName: ResourceAttributeConfig{Enabled: true}, + GcpGceInstanceGroupManagerRegion: ResourceAttributeConfig{Enabled: true}, + GcpGceInstanceGroupManagerZone: ResourceAttributeConfig{Enabled: true}, + HostID: ResourceAttributeConfig{Enabled: true}, + HostName: ResourceAttributeConfig{Enabled: true}, + HostType: ResourceAttributeConfig{Enabled: true}, + K8sClusterName: ResourceAttributeConfig{Enabled: true}, }, }, { name: "none_set", want: ResourceAttributesConfig{ - CloudAccountID: ResourceAttributeConfig{Enabled: false}, - CloudAvailabilityZone: ResourceAttributeConfig{Enabled: false}, - CloudPlatform: ResourceAttributeConfig{Enabled: false}, - CloudProvider: ResourceAttributeConfig{Enabled: false}, - CloudRegion: ResourceAttributeConfig{Enabled: false}, - FaasID: ResourceAttributeConfig{Enabled: false}, - FaasInstance: ResourceAttributeConfig{Enabled: false}, - FaasName: ResourceAttributeConfig{Enabled: false}, - FaasVersion: ResourceAttributeConfig{Enabled: false}, - GcpCloudRunJobExecution: ResourceAttributeConfig{Enabled: false}, - GcpCloudRunJobTaskIndex: ResourceAttributeConfig{Enabled: false}, - GcpGceInstanceHostname: ResourceAttributeConfig{Enabled: false}, - GcpGceInstanceName: ResourceAttributeConfig{Enabled: false}, - HostID: ResourceAttributeConfig{Enabled: false}, - HostName: ResourceAttributeConfig{Enabled: false}, - HostType: ResourceAttributeConfig{Enabled: false}, - K8sClusterName: ResourceAttributeConfig{Enabled: false}, + CloudAccountID: ResourceAttributeConfig{Enabled: false}, + CloudAvailabilityZone: ResourceAttributeConfig{Enabled: false}, + CloudPlatform: ResourceAttributeConfig{Enabled: false}, + CloudProvider: ResourceAttributeConfig{Enabled: false}, + CloudRegion: ResourceAttributeConfig{Enabled: false}, + FaasID: ResourceAttributeConfig{Enabled: false}, + FaasInstance: ResourceAttributeConfig{Enabled: false}, + FaasName: ResourceAttributeConfig{Enabled: false}, + FaasVersion: ResourceAttributeConfig{Enabled: false}, + GcpCloudRunJobExecution: ResourceAttributeConfig{Enabled: false}, + GcpCloudRunJobTaskIndex: ResourceAttributeConfig{Enabled: false}, + GcpGceInstanceHostname: ResourceAttributeConfig{Enabled: false}, + GcpGceInstanceName: ResourceAttributeConfig{Enabled: false}, + GcpGceInstanceGroupManagerName: ResourceAttributeConfig{Enabled: false}, + GcpGceInstanceGroupManagerRegion: ResourceAttributeConfig{Enabled: false}, + GcpGceInstanceGroupManagerZone: ResourceAttributeConfig{Enabled: false}, + HostID: ResourceAttributeConfig{Enabled: false}, + HostName: ResourceAttributeConfig{Enabled: false}, + HostType: ResourceAttributeConfig{Enabled: false}, + K8sClusterName: ResourceAttributeConfig{Enabled: false}, }, }, } diff --git a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource.go b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource.go index acd1aab7c307..2180474867bf 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource.go +++ b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource.go @@ -112,6 +112,27 @@ func (rb *ResourceBuilder) SetGcpGceInstanceName(val string) { } } +// SetGcpGceInstanceGroupManagerName sets provided value as "gcp.gce.instance_group_manager.name" attribute. +func (rb *ResourceBuilder) SetGcpGceInstanceGroupManagerName(val string) { + if rb.config.GcpGceInstanceGroupManagerName.Enabled { + rb.res.Attributes().PutStr("gcp.gce.instance_group_manager.name", val) + } +} + +// SetGcpGceInstanceGroupManagerRegion sets provided value as "gcp.gce.instance_group_manager.region" attribute. +func (rb *ResourceBuilder) SetGcpGceInstanceGroupManagerRegion(val string) { + if rb.config.GcpGceInstanceGroupManagerRegion.Enabled { + rb.res.Attributes().PutStr("gcp.gce.instance_group_manager.region", val) + } +} + +// SetGcpGceInstanceGroupManagerZone sets provided value as "gcp.gce.instance_group_manager.zone" attribute. +func (rb *ResourceBuilder) SetGcpGceInstanceGroupManagerZone(val string) { + if rb.config.GcpGceInstanceGroupManagerZone.Enabled { + rb.res.Attributes().PutStr("gcp.gce.instance_group_manager.zone", val) + } +} + // SetHostID sets provided value as "host.id" attribute. func (rb *ResourceBuilder) SetHostID(val string) { if rb.config.HostID.Enabled { diff --git a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource_test.go b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource_test.go index 28cd9d9f4127..5991c52b62ce 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource_test.go +++ b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/generated_resource_test.go @@ -26,6 +26,9 @@ func TestResourceBuilder(t *testing.T) { rb.SetGcpCloudRunJobTaskIndex("gcp.cloud_run.job.task_index-val") rb.SetGcpGceInstanceHostname("gcp.gce.instance.hostname-val") rb.SetGcpGceInstanceName("gcp.gce.instance.name-val") + rb.SetGcpGceInstanceGroupManagerName("gcp.gce.instance_group_manager.name-val") + rb.SetGcpGceInstanceGroupManagerRegion("gcp.gce.instance_group_manager.region-val") + rb.SetGcpGceInstanceGroupManagerZone("gcp.gce.instance_group_manager.zone-val") rb.SetHostID("host.id-val") rb.SetHostName("host.name-val") rb.SetHostType("host.type-val") @@ -36,9 +39,9 @@ func TestResourceBuilder(t *testing.T) { switch tt { case "default": - assert.Equal(t, 15, res.Attributes().Len()) + assert.Equal(t, 18, res.Attributes().Len()) case "all_set": - assert.Equal(t, 17, res.Attributes().Len()) + assert.Equal(t, 20, res.Attributes().Len()) case "none_set": assert.Equal(t, 0, res.Attributes().Len()) return @@ -111,6 +114,21 @@ func TestResourceBuilder(t *testing.T) { if ok { assert.EqualValues(t, "gcp.gce.instance.name-val", val.Str()) } + val, ok = res.Attributes().Get("gcp.gce.instance_group_manager.name") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "gcp.gce.instance_group_manager.name-val", val.Str()) + } + val, ok = res.Attributes().Get("gcp.gce.instance_group_manager.region") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "gcp.gce.instance_group_manager.region-val", val.Str()) + } + val, ok = res.Attributes().Get("gcp.gce.instance_group_manager.zone") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "gcp.gce.instance_group_manager.zone-val", val.Str()) + } val, ok = res.Attributes().Get("host.id") assert.True(t, ok) if ok { diff --git a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/resource.go b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/resource.go index fd6032df1231..17ba4ba90a0d 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/resource.go +++ b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/resource.go @@ -43,3 +43,20 @@ func (rb *ResourceBuilder) SetZoneOrRegion(detect func() (string, gcp.LocationTy } return nil } + +func (rb *ResourceBuilder) SetManagedInstanceGroup(detect func() (gcp.ManagedInstanceGroup, error)) error { + v, err := detect() + if err != nil { + return err + } + if v.Name != "" { + rb.SetGcpGceInstanceGroupManagerName(v.Name) + } + switch v.Type { + case gcp.Zone: + rb.SetGcpGceInstanceGroupManagerZone(v.Location) + case gcp.Region: + rb.SetGcpGceInstanceGroupManagerRegion(v.Location) + } + return nil +} diff --git a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/testdata/config.yaml b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/testdata/config.yaml index 00d45ed6c70b..859e9bef440b 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/testdata/config.yaml +++ b/processor/resourcedetectionprocessor/internal/gcp/internal/metadata/testdata/config.yaml @@ -27,6 +27,12 @@ all_set: enabled: true gcp.gce.instance.name: enabled: true + gcp.gce.instance_group_manager.name: + enabled: true + gcp.gce.instance_group_manager.region: + enabled: true + gcp.gce.instance_group_manager.zone: + enabled: true host.id: enabled: true host.name: @@ -63,6 +69,12 @@ none_set: enabled: false gcp.gce.instance.name: enabled: false + gcp.gce.instance_group_manager.name: + enabled: false + gcp.gce.instance_group_manager.region: + enabled: false + gcp.gce.instance_group_manager.zone: + enabled: false host.id: enabled: false host.name: diff --git a/processor/resourcedetectionprocessor/internal/gcp/metadata.yaml b/processor/resourcedetectionprocessor/internal/gcp/metadata.yaml index b6ab6fcc9ef9..3026c6359447 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/metadata.yaml +++ b/processor/resourcedetectionprocessor/internal/gcp/metadata.yaml @@ -71,3 +71,15 @@ resource_attributes: description: The hostname of the GCE instance. type: string enabled: false + gcp.gce.instance_group_manager.name: + description: The name of an instanceGroupManager. + type: string + enabled: true + gcp.gce.instance_group_manager.zone: + description: The zone of a zonal instanceGroupManager. + type: string + enabled: true + gcp.gce.instance_group_manager.region: + description: The region of a regional instanceGroupManager. + type: string + enabled: true diff --git a/processor/resourcedetectionprocessor/internal/gcp/types.go b/processor/resourcedetectionprocessor/internal/gcp/types.go index 523ba84d73bb..0c3c33de6015 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/types.go +++ b/processor/resourcedetectionprocessor/internal/gcp/types.go @@ -33,6 +33,7 @@ type gcpDetector interface { CloudRunJobTaskIndex() (string, error) GCEInstanceHostname() (string, error) GCEInstanceName() (string, error) + GCEManagedInstanceGroup() (gcp.ManagedInstanceGroup, error) BareMetalSolutionInstanceID() (string, error) BareMetalSolutionCloudRegion() (string, error) BareMetalSolutionProjectID() (string, error)