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

[resourcedetection] Unify gke and gce detectors and fix gke zone/region detection #10347

Merged
merged 1 commit into from
May 31, 2022

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented May 25, 2022

Description:
Fixes #9682

This is modeled after open-telemetry/opentelemetry-go-contrib#2310, which implements resource detection for the go SDK.

It replaces the gce and gke detectors with a single gcp detector. This eliminates the need to correctly order the two detectors when running on GKE to get correct behavior. In order to facilitate the migration, i've added warning messages, and ensured that when multiple gcp detectors are used that they are deduplicated.

This adds a new dependency: https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/tree/main/detectors/gcp, which is a library for detecting attributes in GCP environments. It is integration tested in real GCP environments.

This adds support for Cloud Run, Cloud Functions (not sure why/how someone would run a collector there, but its possible in theory :)), and App Engine as well.

Removal of 'gke' and 'gce' is tracked in #10348.

Testing:

Unit tests added.

Documentation:

@dashpole dashpole force-pushed the improve_gcp_detection branch 2 times, most recently from b493486 to aadd101 Compare May 25, 2022 17:26
@dashpole dashpole marked this pull request as ready for review May 25, 2022 18:00
@dashpole dashpole requested a review from a team May 25, 2022 18:00
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@pmm-sumo pmm-sumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some trivial Changelog fixes needed but otherwise LGTM

@codeboten codeboten merged commit 618f761 into open-telemetry:main May 31, 2022
@dashpole dashpole deleted the improve_gcp_detection branch June 1, 2022 12:55
kentquirk pushed a commit to McSick/opentelemetry-collector-contrib that referenced this pull request Jun 14, 2022
…on detection (open-telemetry#10347)

resourcedetectionprocessor: unify gke and gce detectors and fix gke zone/region detection
codeboten pushed a commit that referenced this pull request Jan 18, 2024
…n processor readme (#30665)

**Description:** <Describe what has changed.>
Some time ago `gce` and `gke` detectors were
[deprecated](#10347)
to use a single `gcp` detector.
This PR updates README to remove mentions of `gce` and `gke` detectors
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Feb 1, 2024
…n processor readme (open-telemetry#30665)

**Description:** <Describe what has changed.>
Some time ago `gce` and `gke` detectors were
[deprecated](open-telemetry#10347)
to use a single `gcp` detector.
This PR updates README to remove mentions of `gce` and `gke` detectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GKE Resource detection doesn't work well with workload identity
3 participants