Skip to content

Commit

Permalink
Update DESIGN.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Sep 9, 2024
1 parent 85ee299 commit 2924ccb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions log/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,19 @@ Rejected alternatives:
- [Add XYZ method to Logger](#add-xyz-method-to-logger)
- [Rename KeyValue to Attr](#rename-keyvalue-to-attr)

### Logger.Enabled

The `Enabled` method implements the [`Enabled` operation](https://opentelemetry.io/docs/specs/otel/logs/bridge-api/#enabled).

[`Context` associated with the `LogRecord`](https://opentelemetry.io/docs/specs/otel/context/)
is accepted as a `context.Context` method argument.

Calls to `Enabled` are supposed to be on the hot path and the list of arguments
can be extendend in future. Therefore, in order to reduce the number of heap
allocations and make it possible to handle new arguments, `Enabled` accepts
a `EnabledParam` struct, defined in [enabled.go](enabled.go), as the second
method argument.

### noop package

The `go.opentelemetry.io/otel/log/noop` package provides
Expand Down

0 comments on commit 2924ccb

Please sign in to comment.