Skip to content

Commit

Permalink
[sdk + otlp] CHANGELOG tweaks to cover logging PR feedback (#4415)
Browse files Browse the repository at this point in the history
Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
  • Loading branch information
CodeBlanch and cijothomas authored Apr 25, 2023
1 parent 7cec101 commit 2914002
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 26 additions & 2 deletions src/OpenTelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2914002

Please sign in to comment.