Skip to content

Logging API hide std_to_otel function to convert python logging severity to otel severity #4649

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

Merged
merged 4 commits into from
Jun 25, 2025

Conversation

hectorhdzg
Copy link
Member

Description

Hide unexpected method in Logs API, this is only being used internally by LoggerHandler

Fixes #4314

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@hectorhdzg hectorhdzg requested a review from a team as a code owner June 19, 2025 23:55
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, confirmed that std_to_otel isn't used anywhere in contrib either. I'm pretty sure the aio-pika test failure is unrelated.

Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During a quick search on GitHub, I found this. It looks like a few repositories are already using it, but I’d rather deal with breakages now than after the signal is marked as stable. Would like to have some thoughts from maintainers.

@lzchen
Copy link
Contributor

lzchen commented Jun 25, 2025

During a quick search on GitHub, I found this. It looks like a few repositories are already using it, but I’d rather deal with breakages now than after the signal is marked as stable. Would like to have some thoughts from maintainers.

This should be fine since the signal is experimental.

@lzchen lzchen merged commit 2a0282c into open-telemetry:main Jun 25, 2025
445 of 450 checks passed
@herman5
Copy link

herman5 commented Jul 13, 2025

Discovered this PR after finding a breaking change in our logging handler when updating to 1.35.0. For our use case, we do not want to depend on the SDK, which is now required after this change. I suspect other folks implementing custom logging handlers are in the same position.

@xrmx
Copy link
Contributor

xrmx commented Jul 14, 2025

Discovered this PR after finding a breaking change in our logging handler when updating to 1.35.0. For our use case, we do not want to depend on the SDK, which is now required after this change. I suspect other folks implementing custom logging handlers are in the same position.

If you are using another sdk implementation, you can just reimplement the thing there?

@viliusgudziunas
Copy link

I also have a custom exporter for structlog. It was using this std_to_otel function. I understand your suggestion is to copy the function into my own implementation - yes?

@herman5
Copy link

herman5 commented Jul 14, 2025

Given the small footprint, we copied std_to_otel into our implementation

@xrmx
Copy link
Contributor

xrmx commented Jul 14, 2025

I also have a custom exporter for structlog. It was using this std_to_otel function. I understand your suggestion is to copy the function into my own implementation - yes?

Well, this is a different use case and possibly the reason why this was in the api 😅

@viliusgudziunas
Copy link

viliusgudziunas commented Jul 21, 2025

Given the small footprint, we copied std_to_otel into our implementation

Also ended up copying the function into my own code

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

Successfully merging this pull request may close these issues.

Logs API: hide or rename std_to_otel function to convert python logging severity to otel severity
7 participants