1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-03-29 21:47:00 +02:00
Robert Pająk 2024-11-05 12:56:07 +01:00 committed by GitHub
parent a62c45a580
commit 12305663a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View File

@ -26,14 +26,12 @@ This proposed design aims to:
The API is published as a single `go.opentelemetry.io/otel/log` Go module.
The module name is compliant with
[Artifact Naming](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md#artifact-naming)
and the package structure is the same as for Trace API and Metrics API.
The package structure is similar to Trace API and Metrics API.
The Go module consists of the following packages:
- `go.opentelemetry.io/otel/log`
- `go.opentelemetry.io/otel/log/embedded`
- `go.opentelemetry.io/otel/log/logtest`
- `go.opentelemetry.io/otel/log/noop`
Rejected alternative:

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
/*
Package log provides the OpenTelemetry Logs Bridge API.
Package log provides the OpenTelemetry Logs API.
This package is intended to be used by bridges between existing logging
libraries and OpenTelemetry. Users should not directly use this package as a

View File

@ -28,6 +28,9 @@ type Logger interface {
//
// Implementations of this method need to be safe for a user to call
// concurrently.
//
// Notice: Emit is intended to be used by log bridges.
// Is should not be used for writing instrumentation.
Emit(ctx context.Context, record Record)
// Enabled returns whether the Logger emits for the given context and
@ -50,6 +53,9 @@ type Logger interface {
//
// Implementations of this method need to be safe for a user to call
// concurrently.
//
// Notice: Enabled is intended to be used by log bridges.
// Is should not be used for writing instrumentation.
Enabled(ctx context.Context, param EnabledParameters) bool
}