diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb6c251775..bb2f5962056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/log/record.go b/log/record.go index 96302f00624..7cf5446a041 100644 --- a/log/record.go +++ b/log/record.go @@ -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