opentelemetry-dotnet
opentelemetry-dotnet copied to clipboard
OpenTelemetry.Exporter.Console: Print exception attributes according to SemConv
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)