Skip to content

Commit

Permalink
[Go] Add log bridges to Registry (#4857)
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Jul 22, 2024
1 parent abe6c1e commit f5736f4
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 9 deletions.
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

0 comments on commit f5736f4

Please sign in to comment.