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

Consider moving LoggingHandler out of the SDK and into an instrumentation #4330

Open
aabmass opened this issue Nov 27, 2024 · 4 comments
Open
Labels
auto-instrumentation related to auto-instrumentation of the sdk logging sdk Affects the SDK package.

Comments

@aabmass
Copy link
Member

aabmass commented Nov 27, 2024

LoggingHandler is a Python stdlib logging.Handler implementation that bridges stdlib logging to the Logs SDK.

Some reasoning:

  • It is not something that is specified in the SDK
  • Will need to follow SDK versioning
  • As a separate package, users could simply uninstall it if they don't want logging logs captured at all (or use OTEL_PYTHON_DISABLED_INSTRUMENTATIONS).
  • Consider that opentelemetry-instrumentation-urllib is separate even though urllib is part the python standard library.
  • There are other logging APIs like structlog.

Arguments against:

  • A high percentage of users want to set it and forget it and this adds an extra step
@aabmass aabmass added sdk Affects the SDK package. auto-instrumentation related to auto-instrumentation of the sdk logging labels Nov 27, 2024
@xrmx
Copy link
Contributor

xrmx commented Nov 28, 2024

We already have a logging instrumentation btw.

The argument against is valid for every other instrumentation 😅

@aabmass
Copy link
Member Author

aabmass commented Dec 2, 2024

The argument against is valid for every other instrumentation 😅

True just trying to present some counterargument.

Existing logging instrumentation confusion aside, are you in favor or against moving LoggingHandler out of the SDK?

@lzchen
Copy link
Contributor

lzchen commented Dec 2, 2024

I believe java already uses this convention for different logging libraries. Happy to discuss this in the SIG @aabmass

@xrmx
Copy link
Contributor

xrmx commented Dec 2, 2024

The argument against is valid for every other instrumentation 😅

True just trying to present some counterargument.

Existing logging instrumentation confusion aside, are you in favor or against moving LoggingHandler out of the SDK?

I'm in favor, it would be a lot less confusing to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-instrumentation related to auto-instrumentation of the sdk logging sdk Affects the SDK package.
Projects
Development

No branches or pull requests

3 participants