docs: add instrumentation naming convention to contributing guide - #4754
docs: add instrumentation naming convention to contributing guide#4754krrishapatel wants to merge 1 commit into
Conversation
xrmx
left a comment
There was a problem hiding this comment.
This contains unrelated changes
Add a note under the instrumentation guidelines that tracers and meters should be obtained using the top-level instrumentation package name as a fixed string (e.g. "opentelemetry.instrumentation.requests") rather than __name__, which varies by submodule. Assisted-by: Claude Opus 4.6
65484c8 to
dd792c1
Compare
|
@xrmx Rebased to remove the unrelated change — this now only touches CONTRIBUTING.md. Mind taking another look? |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
|
Closing this myself — the guidance as written is wrong, and I should have checked it against the codebase before proposing it. I went back through the shipped instrumentations, and 35 of them pass The reason The narrower thing I was actually reacting to is real but rare: when
That is a two-line observation about one package, not a contributing-guide checklist item, so it does not justify this PR. If maintainers think the pika case is worth normalizing I am happy to open a small targeted PR for it, but I would rather ask first than add another unsolicited one. Apologies for the noise on this and on #4753. @xrmx your "unrelated changes" review was the correct call on the original version, and I should have validated the underlying claim rather than just trimming the diff. |
Description
Adds a note to the instrumentation guidelines section of CONTRIBUTING.md documenting that instrumentations should use their top-level package name (e.g.
"opentelemetry.instrumentation.requests") as a fixed string when obtaining a tracer or meter, rather than__name__.Fixes #910
Type of change
How Has This Been Tested?
Documentation-only change.
Does This PR Require a Core Repo Change?
Assisted-by: Claude Opus 4.6