Skip to content

TracerProvider(ABC) doc string correction#4894

Open
42Questions wants to merge 2 commits intoopen-telemetry:mainfrom
42Questions:get-tracer-doc-string
Open

TracerProvider(ABC) doc string correction#4894
42Questions wants to merge 2 commits intoopen-telemetry:mainfrom
42Questions:get-tracer-doc-string

Conversation

@42Questions
Copy link

@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

linux-foundation-easycla bot commented Feb 3, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@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
Contributor

xrmx commented Feb 4, 2026

Isn't every instrumentation using __name__ though?

@42Questions
Copy link
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 @xrmx's Python PR digest Feb 4, 2026
@42Questions
Copy link
Author

42Questions commented Feb 4, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Easy to review / merge / close

Development

Successfully merging this pull request may close these issues.

3 participants