diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md index 1fae07de715..7273a4ffc43 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md @@ -3,11 +3,17 @@ ## Unreleased * The `OpenTelemetryLoggerOptions.AddOtlpExporter` extension no longer - automatically set `OpenTelemetryLoggerOptions.ParseStateValues` to `true`. + automatically sets `OpenTelemetryLoggerOptions.ParseStateValues` to `true`. + The OpenTelemetry SDK now automatically sets `Attributes` (aka `StateValues`) + for the common cases where `ParseStateValues` was previously required. + `ParseStateValues` can be set to `true` manually by users to enable parsing of + custom states which do not implement `IReadOnlyList` / `IEnumerable` + interfaces. ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) -* Updated to use the new `LogRecord.Attributes` field as `StateValues` is now - marked obsolete. +* Updated to use the new `LogRecord.Attributes` field as `LogRecord.StateValues` + is now marked obsolete. There is no impact to transmitted data (`StateValues` + and `Attributes` are equivalent). ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) ## 1.5.0-alpha.2 diff --git a/src/OpenTelemetry/CHANGELOG.md b/src/OpenTelemetry/CHANGELOG.md index 698926494f7..196fa55acde 100644 --- a/src/OpenTelemetry/CHANGELOG.md +++ b/src/OpenTelemetry/CHANGELOG.md @@ -15,9 +15,33 @@ name which resembles the package version of the SDK. ([#4375](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4375)) +* Obsoleted `State` and `StateValues` properties and added `Body` and + `Attributes` properties on `LogRecord`. Note: `LogRecord.Attributes` and + `LogRecord.StateValues` point to the same data. "Attributes" is what the + OpenTelemetry Specification defines so this was changed for clarity & + consistency with the specification. + ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) + * Tweaked the behavior of the `OpenTelemetryLoggerOptions.ParseStateValues` - flag, obsoleted `LogRecord.State` and `LogRecord.StateValues` properties, and - added `LogRecord.Body` and `LogRecord.Attributes` properties. + flag: + + * `LogRecord.Attributes` (aka `LogRecord.StateValues`) are now automatically + included for all log messages with states implementing `IReadOnlyList` or + `IEnumerable`. + + * `OpenTelemetryLoggerOptions.ParseStateValues` is now used to tell the SDK to + parse (using reflection) attributes for custom states which do not implement + `IReadOnlyList` or `IEnumerable`. Only top-level properties are included. + + * `LogRecord.State` will only be set to the raw state object if no attributes + are found. + + See [#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334) + for details. + +* If a template (`{OriginalFormat}` attribute) cannot be found on log messages a + formatted message will now automatically be generated (even if + `OpenTelemetryLoggerOptions.IncludeFormattedMessage` is set to `false`). ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) ## 1.5.0-alpha.2