Skip to content

Commit f710cec

Browse files
authored
log: Make Record not comparable (#5847)
Fixes #5696
1 parent 84677a6 commit f710cec

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1313
- Enable exemplars by default in `go.opentelemetry.io/otel/sdk/metric`. Exemplars can be disabled by setting `OTEL_METRICS_EXEMPLAR_FILTER=always_off` (#5778)
1414
- `Logger.Enabled` in `go.opentelemetry.io/otel/log` now accepts a newly introduced `EnabledParameters` type instead of `Record`. (#5791)
1515
- `FilterProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log/internal/x` now accepts `EnabledParameters` instead of `Record`. (#5791)
16+
- The `Record` type in `go.opentelemetry.io/otel/log` is no longer comparable. (#5847)
1617

1718
### Fixed
1819

log/record.go

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const attributesInlineCount = 5
1616

1717
// Record represents a log record.
1818
type Record struct {
19+
// Ensure forward compatibility by explicitly making this not comparable.
20+
noCmp [0]func() //nolint: unused // This is indeed used.
21+
1922
timestamp time.Time
2023
observedTimestamp time.Time
2124
severity Severity

0 commit comments

Comments
 (0)