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

Resource dectection for Open-Source platforms should be distinct from cloud-provider detection #788

Open
dashpole opened this issue May 18, 2021 · 2 comments
Labels
area: detector Related to a detector package enhancement New feature or request

Comments

@dashpole
Copy link
Contributor

dashpole commented May 18, 2021

Background

Currently, resource detection for GKE and EKS is done in separate packages (EKS, GKE), and have diverged in what they detect (container id vs container name, pod name, pod namespace), and how they detect those attributes (reading cgroup for container ID vs environment variables for pod name, namespace, container name).

It would be nice to be able to give users a consistent story around resource detection on kubernetes regardless of cloud provider.

As a potential use-case, it would be nice to be able to keep my application cloud-provider agnostic, and only use the kubernetes detector. Then, depending on the cloud-provider, I can send my telemetry to a collector that adds cloud-provider-specific attributes. This makes my application portable, which is one of the selling points of kubernetes.

Proposed Solution

Principle: A resource detector should detect at most one category of resource from the semantic conventions.

Users should install all relevant categories of resource (e.g. on GKE I should install GKE, GCE, and Kubernetes detectors)

Alternative: Resource detectors can "wrap" other resource detectors (e.g. GKE includes the GCE and Kubernetes detectors, but doesn't re-implement detection).

We should introduce a separate "kubernetes" resource detector, that detects all kubernetes attributes, and a "container" detector that detects container attributes.

Cloud providers should only detect cloud-provider-specific resource attributes.

Let me know if this should be an OTEP instead...

@dashpole dashpole added enhancement New feature or request area: instrumentation Related to an instrumentation package release:after-ga labels May 18, 2021
@dashpole
Copy link
Contributor Author

cc @aabmass

@dashpole dashpole added area: detector Related to a detector package and removed area: instrumentation Related to an instrumentation package labels May 18, 2021
@Aneurysm9
Copy link
Member

I think this seems like a reasonable proposal. It would probably be good to make an OTEP to get broader feedback and see if we can make the pattern consistent across all implementations, but I don't see why we'd need to let that stop us from moving forward with it if we thing it is the right thing for our implementation.

plantfansam referenced this issue in plantfansam/opentelemetry-go-contrib Mar 18, 2022
Ensure zipkin exporter reads and closes response body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: detector Related to a detector package enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants