Skip to content

Proposal: rename package opentelemetry-resource-detector-container #3455

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

Closed
emdneto opened this issue Apr 29, 2025 · 5 comments · Fixed by #3536
Closed

Proposal: rename package opentelemetry-resource-detector-container #3455

emdneto opened this issue Apr 29, 2025 · 5 comments · Fixed by #3536

Comments

@emdneto
Copy link
Member

emdneto commented Apr 29, 2025

Description

Per issue #1923 and also pypi/support#3374, which has no estimated time of resolution, I propose to SIG that we vote to rename the contrib package opentelemetry-resource-detector-container so we can release it in the regular monthly releases.

Some options for renaming it:

  • opentelemetry-resource-detector-cgroup
  • opentelemetry-resource-detector-container-metadata
  • opentelemetry-resource-detector-containerid
  • opentelemetry-resource-detector-oci (OCI from Open Container Initiative) - @aabmass suggestion discarded

Suggestions are welcome.

@emdneto
Copy link
Member Author

emdneto commented Apr 29, 2025

I'm more inclined to one of:

  • opentelemetry-resource-detector-cgroup
  • opentelemetry-resource-detector-oci discarded

@aabmass
Copy link
Member

aabmass commented Apr 29, 2025

After doing a little digging, I don't think -oci is a good choice since it's not part of the spec opencontainers/runtime-spec#1105. It seems to be a docker convention which probably works on other container runtimes.

@aabmass
Copy link
Member

aabmass commented Apr 29, 2025

Right now, it only detects the container ID:

resource = resource.merge(
Resource({ResourceAttributes.CONTAINER_ID: container_id})
)

Do you think we will expand this to other attributes? If not, maybe opentelemetry-resource-detector-container(?-)id

@emdneto
Copy link
Member Author

emdneto commented Apr 30, 2025

Right now, it only detects the container ID:

opentelemetry-python-contrib/resource/opentelemetry-resource-detector-container/src/opentelemetry/resource/detector/container/init.py

Lines 81 to 83 in da661f6

resource = resource.merge(
Resource({ResourceAttributes.CONTAINER_ID: container_id})
)
Do you think we will expand this to other attributes? If not, maybe opentelemetry-resource-detector-container(?-)id

At this moment, I don't see a way we can collect other metadata from inside the container itself. Other attributes like image depend on the access to the runtime, which in most scenarios isn't suitable inside the container. That said, I think opentelemetry-resource-detector-container-metadata or your suggestion with id makes more sense.

@emdneto
Copy link
Member Author

emdneto commented May 15, 2025

My vote: opentelemetry-resource-detector-containerid, without the hyphen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants