-
Notifications
You must be signed in to change notification settings - Fork 562
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
Add slog log bridge #5138
Comments
Recommended reading: https://github.com/golang/example/blob/master/slog-handler-guide/README.md And perhaps before that, I'd also recommend getting familiar with OpenTelemetry, if you aren't already: It might also help to understand what OpenTelemetry is by taking a look at the demo: |
I would like to start working over this to get the better and in depth understanding of open-telemetry/community#1865 Till now what I've understood is that too configure a logging handler for slog logging library in go. The flow goes like this
Am I on the correct path? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
SIG meeting notes: plan is to add this bridge to contrib. |
I've added this to the scope of a few internships, such as LFX and Outreachy. Please, talk to me before working on this one. |
@jpkrohling I updated the description to make the issue more open for new contributors. However, we may want to start working on it sooner to be able to showcase it at KubeCon EU 2024. |
I think the LFX announcement happens today, and we'll start working on that right away. |
We are already starting working on it 🚀 |
@jba, we have an initial version of You can simply create a new GitHub issue with your feedback or even add some comments here. You can also review and add comments here: #5314 as this is the PR that introduced most of the implementation. |
Thanks for including me. I made a couple of performance-related comments on the PR, not really important. |
Add
slog.Handler
log bridgego.opentelemetry.io/contrib/bridges/sloghandler
) and its version as instrumentation scopeWithGroup
should result in nesting the attributes in a https://pkg.go.dev/go.opentelemetry.io/otel/log#Map so that it has similar behavior toslog.JSONHandler
. See: https://go.dev/play/p/bjJp7A-56bfAdditional resources:
slog.Handler
: https://github.com/golang/example/blob/master/slog-handler-guide/README.mdThe text was updated successfully, but these errors were encountered: