Skip to content

TracerProvider(ABC) doc string correction#4894

Merged
xrmx merged 5 commits intoopen-telemetry:mainfrom
42Questions:get-tracer-doc-string
Feb 23, 2026
Merged

TracerProvider(ABC) doc string correction#4894
xrmx merged 5 commits intoopen-telemetry:mainfrom
42Questions:get-tracer-doc-string

Conversation

@42Questions
Copy link
Copy Markdown
Contributor

@42Questions 42Questions commented Feb 3, 2026

Description

Correction to class TracerProvider(ABC) docstring, extensively discussed but never implemented open-telemetry/opentelemetry.io#2517 .

Correction to class TracerProvider(ABC).get_meter docstring as well with the same mistake.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Feb 3, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: xrmx / name: Riccardo Magliocchetti (66d7402)

@42Questions 42Questions marked this pull request as ready for review February 3, 2026 19:07
@42Questions 42Questions requested a review from a team as a code owner February 3, 2026 19:07
@42Questions 42Questions changed the title Minimal doc string change TracerProvider(ABC) doc string correction Feb 3, 2026
@xrmx
Copy link
Copy Markdown
Contributor

xrmx commented Feb 4, 2026

Isn't every instrumentation using __name__ though?

@42Questions
Copy link
Copy Markdown
Contributor Author

42Questions commented Feb 4, 2026

Isn't every instrumentation using __name__ though?

Yes. I've purposefully done a minimal change, but as mentioned here, a less prescriptive docstring could be warranted:

instrumenting_module_name: The uniquely identifiable name for instrumentation scope, such as instrumentation library, package, module, or class name.

That said, the current docstring is incorrect:
__name__ may not be used as this can result in [...]
and did cause me confusion as a newcomer to OTEL.

@xrmx Would it make sense to still include a warning about using __name__ ?

@xrmx xrmx moved this to Easy to review / merge / close in Python PR digest Feb 4, 2026
@42Questions
Copy link
Copy Markdown
Contributor Author

42Questions commented Feb 4, 2026

@xrmx Can the changelog be skipped for this?
I've also corrected the MeterProvider.get_meter docstring.

@xrmx
Copy link
Copy Markdown
Contributor

xrmx commented Feb 6, 2026

@42Questions I've opened open-telemetry/opentelemetry-python-contrib#4173 to pass an explicit value instead of __name__ so the new description should be fine I think

@xrmx xrmx enabled auto-merge (squash) February 23, 2026 10:07
@xrmx xrmx added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Feb 23, 2026
@xrmx xrmx merged commit 80bf955 into open-telemetry:main Feb 23, 2026
547 of 551 checks passed
@github-project-automation github-project-automation Bot moved this from Easy to review / merge / close to Done in Python PR digest Feb 23, 2026
Vitexus pushed a commit to Vitexus/opentelemetry-python that referenced this pull request Apr 30, 2026
* Minimal doc string change

* Fixed same docstring mistake in MeterProvider.get_meter

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants