-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[exporter/debug] make normal
verbosity output one line per telemetry item
#9298
[exporter/debug] make normal
verbosity output one line per telemetry item
#9298
Conversation
6bfdcb6
to
14887dd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9298 +/- ##
==========================================
- Coverage 91.31% 90.69% -0.62%
==========================================
Files 357 351 -6
Lines 19202 18509 -693
==========================================
- Hits 17534 16787 -747
- Misses 1340 1394 +54
Partials 328 328 ☔ View full report in Codecov by Sentry. |
14887dd
to
2750167
Compare
2750167
to
4fb0363
Compare
9f9cc84
to
537bef9
Compare
4c4681a
to
7ccbfe7
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
7ccbfe7
to
c726577
Compare
…g exporter This is in preparation to implement open-telemetry#7806 (draft PR: open-telemetry#9298).
…g exporter (#9922) This PR is the first part of this draft PR: #9298. This refactoring is needed to implement [[exporter/debug] change behavior of "normal" verbosity to be different from "basic" #7806](#7806). I want to change the behavior of the Debug exporter, but leave the behavior of the Logging exporter unchanged. **Link to tracking Issue:** - #7806
🚧 WORK IS IN PROGRESS 🚧
Description:
The Debug exporter's behavior of
normal
verbosity used to be the same as forbasic
verbosity, which is to output only one line of text for each telemetry batch.This changes the behavior of
normal
verbosity to output one line of text for each telemetry item - log record, metric data point, or span. This is a good middle ground betweenbasic
(one line per telemetry batch) anddetailed
(multiple lines per telemetry item).Note that this change only applies to the Debug exporter; the deprecated Logging exporter keeps old behavior.
I've marked this change as
breaking
, but I'm not sure if we want to consider changes in Debug exporter's format as breaking changes?While this PR is in progress, any suggestions on the formatting are welcome. Especially for spans, which I don't have a lot of experience with.
Here's the current output for logs:
Notes:
I don't love the fact that each output from the Debug exporter is prefixed with the timestamp and
info
level string, and suffixed by some more text like{"kind": "exporter", "data_type": "logs", "name": "debug"}
. This makes the output inconsistent.I also believe the Debug exporter should send its output to
stdout
by default and not tostderr
where all collector logs are sent. I believe Debug exporter's output is functionally different from collector logs and belongs tostdout
, as this is what the user expects to see as the collector's output, having configured the Debug exporter.Link to tracking Issue:
Testing:
TODO add tests specifying the behavior
Documentation:
TODO update Debug exporter's README to describe the format
Next steps:
(As a future separate PR) I believe it would be beneficial for users to be able to configure the output format - for example:
output.attributes
whether or not to include records' attributes. They're probably essential for metrics, but for logs - it depends on the nature of the logs. For some users, attributes may be essential; for others, they only obscure the output.output.trace_id
,output.span_id
whether or not to include trace ID, span ID - probably essential for traces, but not necessarily for logs.output.timestamp
whether or not to include timestamp - again some users might find them useful, others might want to remove them for clarity