Add GCE support - #2255
Open
jefchien wants to merge 2 commits into
Open
Conversation
jefchien
marked this pull request as ready for review
August 26, 2026 00:09
Contributor
Binary Size Reportlinux/amd64
Notable changes:
linux/arm64
windows/amd64
Investigating size changesUse go-size-analyzer to compare binaries: GOEXPERIMENT=jsonv2 go install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest
gsa diff --old <baseline-binary> --new <new-binary> |
Paamicky
approved these changes
Aug 26, 2026
EduVencovsky
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Depends on amazon-contributing/opentelemetry-collector-contrib#634 (will need to update go.mod once merged)
Adds GCE (Google Compute Engine) as a host mode to the agent translator with a corresponding detector. The detector uses
cloud.google.com/go/compute/metadata(which is already brought in as a transitive dependency by theresourcedetectionprocessor and promoted to a direct dependency). When detected, the mode is set toModeGCEwhich branches the translator in a couple ways:resourcedetectionprocessor is set up withdetectors: [env, gcp]so telemetry is enriched with GCP related attributes.identitytransform processor is used (transform_identity_gce.yaml), which sets thecloud.resource_idresource attribute to the derived GCP Full Resource Name (https://docs.cloud.google.com/iam/docs/full-resource-names)://compute.googleapis.com/projects/{cloud.account.id}/zones/{cloud.availability_zone}/instances/{host.name}(Note: The page says the last part isINSTANCE_ID, but confirmed by looking at theAsset Inventoryresource information that the last part is the VM display/host name)gcpfor theoidctokenextension to support authentication.License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
default:otelconfig on GCE.auto.oidctokenextension fetched and wrote the token to the expected fileRequirements
Before commiting your code, please do the following steps.
make fmtandmake fmt-shmake lintIntegration Tests
To run integration tests against this PR, add the
ready for testinglabel.