Skip to content
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

[Go] Add log bridges to Registry #4857

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions content/en/docs/languages/go/instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions data/registry/log-bridge-go-logrus.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions data/registry/log-bridge-go-slog.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions data/registry/log-bridge-go-zap.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions data/registry/log-bridge-go-zerolog.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down