Skip to content

Commit

Permalink
log: Make Record not comparable (#5847)
Browse files Browse the repository at this point in the history
Fixes #5696
  • Loading branch information
pellared authored Sep 26, 2024
1 parent 84677a6 commit f710cec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Enable exemplars by default in `go.opentelemetry.io/otel/sdk/metric`. Exemplars can be disabled by setting `OTEL_METRICS_EXEMPLAR_FILTER=always_off` (#5778)
- `Logger.Enabled` in `go.opentelemetry.io/otel/log` now accepts a newly introduced `EnabledParameters` type instead of `Record`. (#5791)
- `FilterProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log/internal/x` now accepts `EnabledParameters` instead of `Record`. (#5791)
- The `Record` type in `go.opentelemetry.io/otel/log` is no longer comparable. (#5847)

### Fixed

Expand Down
3 changes: 3 additions & 0 deletions log/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const attributesInlineCount = 5

// Record represents a log record.
type Record struct {
// Ensure forward compatibility by explicitly making this not comparable.
noCmp [0]func() //nolint: unused // This is indeed used.

timestamp time.Time
observedTimestamp time.Time
severity Severity
Expand Down

0 comments on commit f710cec

Please sign in to comment.