opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

OpenTelemetry.Exporter.Console: Print exception attributes according to SemConv

Open gregkalapos opened this issue 4 months ago • 0 comments

Follow up from https://github.com/open-telemetry/opentelemetry-dotnet/issues/5342#issuecomment-1937110524 - and https://github.com/open-telemetry/semantic-conventions/issues/689

Changes

ConsoleLogRecordExporter prints exception attributes according to the SemConv spec. With this PR, ConsoleLogRecordExporter behaves similarly to OtlpLogRecordTransformer from OpenTelemetry.Exporter.OpenTelemetryProtocol.

Open questions

  • [ ] I'm not familiar with previous design choices, but I really wonder why this is not done directly in /src/OpenTelemetry/Logs? E.g. in LogRecord.cs . With that, all exporters would benefit from this and the responsibility of filling the attributes according to the spec would not be the responsibility of the exporter.

Since I'm fairly new to the code-base I wanted to ask this before I do any such changes - let me know if you think it'd make sense to explore this and I'm happy to update the PR - or open a follow up.

Merge requirement checklist

  • [ ] CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • [ ] Unit tests added/updated
  • [ ] Appropriate CHANGELOG.md files updated for non-trivial changes
  • [ ] Changes in public API reviewed (if applicable)

gregkalapos avatar Feb 12 '24 20:02 gregkalapos