From f5736f4d3fafda9a51d4f887322a0dbeffb0b61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 22 Jul 2024 11:17:06 +0200 Subject: [PATCH] [Go] Add log bridges to Registry (#4857) --- content/en/docs/languages/go/instrumentation.md | 13 ++++--------- data/registry/log-bridge-go-logrus.yml | 17 +++++++++++++++++ data/registry/log-bridge-go-slog.yml | 16 ++++++++++++++++ data/registry/log-bridge-go-zap.yml | 16 ++++++++++++++++ data/registry/log-bridge-go-zerolog.yml | 17 +++++++++++++++++ static/refcache.json | 4 ++++ 6 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 data/registry/log-bridge-go-logrus.yml create mode 100644 data/registry/log-bridge-go-slog.yml create mode 100644 data/registry/log-bridge-go-zap.yml create mode 100644 data/registry/log-bridge-go-zerolog.yml diff --git a/content/en/docs/languages/go/instrumentation.md b/content/en/docs/languages/go/instrumentation.md index 7d77d0425636..41ca2e98046f 100644 --- a/content/en/docs/languages/go/instrumentation.md +++ b/content/en/docs/languages/go/instrumentation.md @@ -1063,14 +1063,12 @@ Now that a `LoggerProvider` is configured, you can use it to set up a A log bridge is a component that bridges logs from an existing log package into the OpenTelemetry [Log SDK](#logs-sdk) using the [Logs Bridge -API][logs bridge API]. Log bridges are available for various popular Go log -packages: +API][logs bridge API]. -- [logrus bridge][otellogrus] -- [slog bridge][otelslog] -- [zap bridge][otelzap] +A full list of log bridges available can be found in the +[OpenTelemetry registry](/ecosystem/registry/?language=go&component=log-bridge). -The links above contain full usage and installation documentation. +Each log bridge package documentation should have a usage example. ### Via file or stdout @@ -1098,9 +1096,6 @@ telemetry backends. https://github.com/open-telemetry/opentelemetry-collector [logs bridge API]: /docs/specs/otel/logs/bridge-api [log data model]: /docs/specs/otel/logs/data-model -[otellogrus]: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otellogrus -[otelslog]: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelslog -[otelzap]: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelzap [`go.opentelemetry.io/otel`]: https://pkg.go.dev/go.opentelemetry.io/otel [`go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`]: https://pkg.go.dev/go.opentelemetry.io/otel/exporters/stdout/stdoutmetric diff --git a/data/registry/log-bridge-go-logrus.yml b/data/registry/log-bridge-go-logrus.yml new file mode 100644 index 000000000000..84c0ca8fc8e5 --- /dev/null +++ b/data/registry/log-bridge-go-logrus.yml @@ -0,0 +1,17 @@ +# cSpell:ignore sirupsen logrus otellogrus +title: logrus log bridge +registryType: log-bridge +language: go +tags: + - logrus + - log-bridge + - go +license: Apache 2.0 +description: + Package otellogrus provides an OpenTelemetry log bridge for + `github.com/sirupsen/logrus`. +authors: + - name: OpenTelemetry Authors +urls: + repo: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otellogrus +createdAt: 2024-05-21 diff --git a/data/registry/log-bridge-go-slog.yml b/data/registry/log-bridge-go-slog.yml new file mode 100644 index 000000000000..762fd5f7ad55 --- /dev/null +++ b/data/registry/log-bridge-go-slog.yml @@ -0,0 +1,16 @@ +# cSpell:ignore otelslog +title: slog log bridge +registryType: log-bridge +language: go +tags: + - slog + - log-bridge + - go +license: Apache 2.0 +description: + Package otelslog provides an OpenTelemetry log bridge for `log/slog`. +authors: + - name: OpenTelemetry Authors +urls: + repo: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelslog +createdAt: 2024-04-05 diff --git a/data/registry/log-bridge-go-zap.yml b/data/registry/log-bridge-go-zap.yml new file mode 100644 index 000000000000..1a989b0bbaaf --- /dev/null +++ b/data/registry/log-bridge-go-zap.yml @@ -0,0 +1,16 @@ +# cSpell:ignore uber otelzap +title: zap log bridge +registryType: log-bridge +language: go +tags: + - zap + - log-bridge + - go +license: Apache 2.0 +description: + Package otelzap provides an OpenTelemetry log bridge for `go.uber.org/zap`. +authors: + - name: OpenTelemetry Authors +urls: + repo: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelzap +createdAt: 2024-07-22 diff --git a/data/registry/log-bridge-go-zerolog.yml b/data/registry/log-bridge-go-zerolog.yml new file mode 100644 index 000000000000..25b689d44cdf --- /dev/null +++ b/data/registry/log-bridge-go-zerolog.yml @@ -0,0 +1,17 @@ +# cSpell:ignore zerolog otelzerolog +title: zerolog log bridge +registryType: log-bridge +language: go +tags: + - zerolog + - log-bridge + - go +license: Apache 2.0 +description: + Package otelzerolog provides an OpenTelemetry log bridge for + `github.com/rs/zerolog`. +authors: + - name: OpenTelemetry Authors +urls: + repo: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelzerolog +createdAt: 2024-07-22 diff --git a/static/refcache.json b/static/refcache.json index 9a0e552aec3c..f78a401d96c0 100644 --- a/static/refcache.json +++ b/static/refcache.json @@ -7635,6 +7635,10 @@ "StatusCode": 200, "LastSeen": "2024-07-18T09:04:56.296529985Z" }, + "https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelzerolog": { + "StatusCode": 200, + "LastSeen": "2024-07-22T08:21:47.06167143Z" + }, "https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/aws/ec2": { "StatusCode": 200, "LastSeen": "2024-05-27T15:24:39.997553+02:00"