Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cijothomas
Copy link
Member

Description

  1. Adds event name from LogRecord to debug exporter.
  2. Also modified the example config file to include logs too. (It only had traces/metrics). Not really required for this change, but hope that is okay to club into same PR!

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.)

CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.61%. Comparing base (a573bc9) to head (059cdcf).

Files with missing lines Patch % Lines
exporter/debugexporter/internal/otlptext/logs.go 0.00% 2 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@@ -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() != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add EventName to DebugExporter output for Logs
3 participants