-
Notifications
You must be signed in to change notification settings - Fork 582
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 zerolog log bridge #5405
Comments
Hello @scorpionknifes , Can i work on this? |
👍 Feel free, I don't have permission to assign you tho. Checkout for other bridge implementation |
How's the progress on this @AkhigbeEromo ? Did you decide to take this on? |
Yes I did @domino14 |
This PR introduces the `otelzerolog` package, which provides a `SeverityHook` to bridge the logging capabilities of Zerolog with OpenTelemetry. The following key features are included: ## Changes - Added `config` struct to handle configuration options. - Implemented `Option` interface and related functions (`WithVersion`, `WithSchemaURL`, `WithLoggerProvider`). - Created `NewSeverityHook` function to initialize a `SeverityHook`. - Defined `SeverityHook` struct to perform the logging bridge functionality. Part of #5405 --------- Co-authored-by: Damien Mathieu <[email protected]> Co-authored-by: Robert Pająk <[email protected]>
Added @dmathieu and @AkhigbeEromo as codeowners for the zerolog bridge part of #5405 --------- Co-authored-by: Tyler Yahn <[email protected]> Co-authored-by: Damien Mathieu <[email protected]>
part of #5405 Implemented the run method and wrote tests for it --------- Co-authored-by: Damien Mathieu <[email protected]> Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Tyler Yahn <[email protected]>
part of #5405 Added benchmark for zerolog The result I got for the benchmark: ``` goos: darwin goarch: amd64 pkg: go.opentelemetry.io/contrib/bridges/otelzerolog cpu: Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz BenchmarkHookRun-4 697216 2059 ns/op 1773 B/op 0 allocs/op PASS ok go.opentelemetry.io/contrib/bridges/otelzerolog 3.110s ```
Fixes #5405 --------- Co-authored-by: Robert Pająk <[email protected]>
The zerolog bridge has been not published. |
Added @dmathieu and @AkhigbeEromo as codeowners for the zerolog bridge part of open-telemetry#5405 --------- Co-authored-by: Tyler Yahn <[email protected]> Co-authored-by: Damien Mathieu <[email protected]>
part of open-telemetry#5405 Implemented the run method and wrote tests for it --------- Co-authored-by: Damien Mathieu <[email protected]> Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Tyler Yahn <[email protected]>
part of open-telemetry#5405 Added benchmark for zerolog The result I got for the benchmark: ``` goos: darwin goarch: amd64 pkg: go.opentelemetry.io/contrib/bridges/otelzerolog cpu: Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz BenchmarkHookRun-4 697216 2059 ns/op 1773 B/op 0 allocs/op PASS ok go.opentelemetry.io/contrib/bridges/otelzerolog 3.110s ```
…y#5930) Fixes open-telemetry#5405 --------- Co-authored-by: Robert Pająk <[email protected]>
This release is the last to support [Go 1.21]. The next release will require at least [Go 1.22]. ### Added - Add the `WithSpanAttributes` and `WithMetricAttributes` methods to set custom attributes to the stats handler in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#5133) - The `go.opentelemetry.io/contrib/bridges/otelzap` module. This module provides an OpenTelemetry logging bridge for `go.uber.org/zap`. (#5191) - Support for the `OTEL_HTTP_CLIENT_COMPATIBILITY_MODE=http/dup` environment variable in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` to emit attributes for both the v1.20.0 and v1.26.0 semantic conventions. (#5401) - The `go.opentelemetry.io/contrib/bridges/otelzerolog` module. This module provides an OpenTelemetry logging bridge for `github.com/rs/zerolog`. (#5405) - Add `WithGinFilter` filter parameter in `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin` to allow filtering requests with `*gin.Context`. (#5743) - Support for stdoutlog exporter in `go.opentelemetry.io/contrib/config`. (#5850) - Add macOS ARM64 platform to the compatibility testing suite. (#5868) - Add new runtime metrics to `go.opentelemetry.io/contrib/instrumentation/runtime`, which are still disabled by default. (#5870) - Add the `WithMetricsAttributesFn` option to allow setting dynamic, per-request metric attributes in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`. (#5876) - The `go.opentelemetry.io/contrib/config` package supports configuring `with_resource_constant_labels` for the prometheus exporter. (#5890) - Support [Go 1.23]. (#6017) ### Removed - The deprecated `go.opentelemetry.io/contrib/processors/baggagecopy` package is removed. (#5853) ### Fixed - Race condition when reading the HTTP body and writing the response in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`. (#5916) [Go 1.23]: https://go.dev/doc/go1.23 [Go 1.22]: https://go.dev/doc/go1.22 [Go 1.21]: https://go.dev/doc/go1.21
Add zerolog.Hook log bridge.
Another pretty popular log library, keen to work on this if we keen on this suggestion
The text was updated successfully, but these errors were encountered: