-
I can saw the trace data but log data, is there something wrong with my code | config or it is a bug? |
Beta Was this translation helpful? Give feedback.
Answered by
pellared
Oct 18, 2024
Replies: 1 comment 1 reply
-
You need to use https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelslog if you want You can also look at https://opentelemetry.io/docs/languages/go/getting-started/#add-custom-instrumentation PS. Share text instead of printscreens. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Wudadada
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to use https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelslog if you want
slog.Logger
to send logs to OpenTelemetry Logger. Currently you are usingslog.NewTextHandler
to send them to standard output.You can also look at https://opentelemetry.io/docs/languages/go/getting-started/#add-custom-instrumentation
PS. Share text instead of printscreens.