-
Notifications
You must be signed in to change notification settings - Fork 576
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 logr log bridge #5192
Comments
Keen to pick this one up |
@scorpionknifes You are assigned. I suggest also looking at https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/bridges/otelslog as reference. |
@scorpionknifes, I added "TODO" steps to the issue description |
This PR is the skeleton for otellogr package, which provides a LogSink to bridge the logging capabilities for Logr with OpenTelemetry Part of #5192 --------- Co-authored-by: Robert Pająk <pellared@hotmail.com>
This PR implements a few methods for otellogr package - Info - WithName - WithValues Out of scope - Enabled - Init - Error - Level Part of #5192
This PR implements a few methods for otellogr package - Configurable LevelSeverity - Enabled Part of #5192 --------- Co-authored-by: Robert Pająk <pellared@hotmail.com>
Implements remaining methods and adds to the changelog Part of #5192 --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com>
Add benchmarks (similar to otelslog) Part of #5192 Benchmark results: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/contrib/bridges/otellogr cpu: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz BenchmarkLogSink/Info-16 6114177 186.4 ns/op 160 B/op 1 allocs/op BenchmarkLogSink/Error-16 6649935 245.2 ns/op 160 B/op 1 allocs/op BenchmarkLogSink/WithValues-16 3949730 295.6 ns/op 448 B/op 3 allocs/op BenchmarkLogSink/WithName-16 6813362 172.0 ns/op 133 B/op 2 allocs/op BenchmarkLogSink/WithName.WithValues-16 2420191 606.4 ns/op 581 B/op 5 allocs/op BenchmarkLogSink/(WithName.WithValues).Info-16 12601381 97.32 ns/op 0 B/op 0 allocs/op PASS ok go.opentelemetry.io/contrib/bridges/otellogr 24.125s ```
@scorpionknifes, I think that at the point we can add I find it safer to track #5357 (comment) as a separate issue. We can even postpone its resolution until we get community feedback if it actually needed. |
Add logr.LogSink log bridge.
Prototype implementation: https://github.com/pellared/opentelemetry-go/blob/147762ffb5c4394417b3f973274cc570723db79b/log/internal/logr.go
TODO:
The text was updated successfully, but these errors were encountered: