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

log: Update package documentation #5942

Merged
merged 4 commits into from
Nov 5, 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
6 changes: 2 additions & 4 deletions log/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion log/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down
Loading