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

Logback OpenTelemetryAppender does not capture logger name as attribute #11670

Closed
YuriyHolinko opened this issue Jun 25, 2024 · 5 comments
Closed

Comments

@YuriyHolinko
Copy link

OpenTelemetryAppender does not allow us to enrich log records with logger name.

The only possible approach is to have the logger name attribute in log record is to use MDC, which is overhead imho.

We can add the functionality to the OpenTelemetryAppender to enrich log record with logger name attribute.

@jeanbisutti
Copy link
Member

With the Logback OpenTelemetryAppender, you can have access to the logger name from the instrumentation scope of the log record.

@laurit laurit added the needs author feedback Waiting for additional feedback from the author label Jun 26, 2024
@YuriyHolinko
Copy link
Author

thanks for the attention, I will check and reply

@github-actions github-actions bot removed the needs author feedback Waiting for additional feedback from the author label Jun 27, 2024
@jeanbisutti jeanbisutti added the needs author feedback Waiting for additional feedback from the author label Jun 27, 2024
@BenEfrati
Copy link

in your otel-collector yaml config you can add transform

processors:
  transform/logs:
    log_statements:
      - context: scope
        statements:
          - set(attributes["log.logger"], name)

Copy link
Contributor

github-actions bot commented Jul 7, 2024

This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed automatically if there is no response from the author within 7 additional days from this comment.

@github-actions github-actions bot added the stale label Jul 7, 2024
@YuriyHolinko
Copy link
Author

thanks, it was a problem on our server side, where instrumentation scope name was ignored

@github-actions github-actions bot removed needs author feedback Waiting for additional feedback from the author stale labels Jul 8, 2024
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

No branches or pull requests

4 participants