open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.07k stars 505 forks source link

otelzap: add testable example and package documentation #5805

Closed thomasgouveia closed 2 days ago

thomasgouveia commented 3 days ago

This PR adds a simple example to demonstrate how to use the OpenTelemetry Zap bridge to send logs emitted by Zap to an OTEL endpoint.

Part of #5191.

@pellared, do we need to write a README also for this module? Or the future package godoc will be sufficient?

dmathieu commented 3 days ago

do we need to write a README also for this module? Or the future package godoc will be sufficient?

I personally think a README always helps folks understanding how to use a module. So while other bridges don't necessarily have one (and generally, this repository probably doesn't have enough doc), having one would be nice.

pellared commented 3 days ago

I think a simple readme with pkg.go.dev badge and one sentence description will be good enough. From https://github.com/open-telemetry/opentelemetry-go/blob/main/CONTRIBUTING.md#readme-files:

Each (non-internal, non-test, non-documentation) package must contain a README.md file containing at least a title, and a pkg.go.dev badge.

thomasgouveia commented 3 days ago

Thanks @pellared @dmathieu, I'll add a minimal README now in this PR.

pellared commented 2 days ago

@thomasgouveia thanks for your contribution 🏅