Not much yet.
remychantenay / slog-otel Goto Github PK
View Code? Open in Web Editor NEWGo slog's Handler implementation to ensure correlation with Open-Telemetry spans.
License: Apache License 2.0
Go slog's Handler implementation to ensure correlation with Open-Telemetry spans.
License: Apache License 2.0
Much like the option for NoBaggage, need a way to stop writing the event logs to the traces - this is correlation is done automatically (and views better than a vanilla event) when the logs are fed to GCP's logs as long as the trace_id and span_id are moved up to the OTEL log record by the OTEL collector (i.e. via trace_parser)
The logic for adding the trace_id skips adding trace_id for any non-recording traces, which isn't helpful - if the trace_id is known it should be added.
Hi,
First of all - wanted to thank you for making a great library. I am reaching out because while using this library, I noticed a small bug. When I have a slice of string
or any
in an argument, it doesn't get recorded.
Example:
strs := make([]string, 2)
strs = append(strs, "arg1")
strs = append(strs, "arg2")
slog.InfoContext(ctx, "arguments", "strs", strs)
This shows up fine on my log output with the appropriate trace_id
and span_id
. However, the argument doesn't get recorded with OTel and is missing from the resulting trace. My configuration is the same as the usage example:
slog.SetDefault(slog.New(slogotel.OtelHandler{
Next: slog.NewJSONHandler(os.Stdout, nil),
}))
First, I thought that this might be a bug on the receiver side, but then I switched to using stdouttrace
and still noticed that it isn't getting recorded. If I marshal the array into a JSON string and then log it with slog, it works fine and shows up in the trace. Are you able to replicate this from your end?
Thanks,
Faraz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.