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

Translate OTEL log's InstrumentationScope as logger name #416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oldium
Copy link

@oldium oldium commented Dec 18, 2024

InstrumentationScope usually contains the name of the instrumentation library. However, in the case of logs, it may also contain the name of the logger if the log source defines it, see here. An instrumentation library usually has a version set, so assume that the name without the version is the name of the logger.

@oldium oldium requested a review from a team as a code owner December 18, 2024 15:33
Copy link

cla-checker-service bot commented Dec 18, 2024

💚 CLA has been signed

@oldium
Copy link
Author

oldium commented Dec 18, 2024

Signed the agreement

InstrumentationScope usually contains the name of the instrumentation
library. However, in the case of logs, it may also contain the name of the
logger if the log source defines it, see [here][1]. An instrumentation
library usually has a version set, so assume that the name without the
version is the name of the logger.

[1]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/api.md#get-a-logger

Signed-off-by: Oldřich Jedlička <[email protected]>
@oldium
Copy link
Author

oldium commented Feb 5, 2025

Anybody here?

Copy link
Member

@carsonip carsonip left a comment

Choose a reason for hiding this comment

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

Sorry for the delayed response. I'll have to check with the team and see whether introducing an assumption around "a missing version = scope name is a logger name" is desirable. Meanwhile, do you mind adding a unit test for the logic?

@oldium
Copy link
Author

oldium commented Feb 5, 2025

I'll have to check with the team and see whether introducing an assumption around "a missing version = scope name is a logger name" is desirable.

Yes, please. The Instrumentation Scope field is unfortunately shared with Logger Name as intended...

Meanwhile, do you mind adding a unit test for the logic?

Yes, sure.

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.

2 participants