-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DebugExporter] Add EventName from LogRecord to output #11967
base: main
Are you sure you want to change the base?
[DebugExporter] Add EventName from LogRecord to output #11967
Conversation
Co-authored-by: Trask Stalnaker <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11967 +/- ##
==========================================
- Coverage 91.62% 91.61% -0.02%
==========================================
Files 447 447
Lines 23739 23741 +2
==========================================
- Hits 21751 21750 -1
- Misses 1613 1615 +2
- Partials 375 376 +1 ☔ View full report in Codecov by Sentry. |
@@ -38,6 +38,9 @@ func (textLogsMarshaler) MarshalLogs(ld plog.Logs) ([]byte, error) { | |||
buf.logEntry("Timestamp: %s", lr.Timestamp()) | |||
buf.logEntry("SeverityText: %s", lr.SeverityText()) | |||
buf.logEntry("SeverityNumber: %s(%d)", lr.SeverityNumber(), lr.SeverityNumber()) | |||
if lr.EventName() != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you ensure a test for this in https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/debugexporter/internal/otlptext/logs_test.go
Description
Link to tracking issue
Fixes #11966
Testing
Manually tested with Otel client that exported a LogRecord with event name and without event name.
(1st time contributor here, still learning the process.)