-
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
More details about trace data in logging exporter #609
More details about trace data in logging exporter #609
Conversation
@pmm-sumo thank you for the contribution. To ensure smoother experience please read https://github.com/open-telemetry/opentelemetry-collector/blob/master/CONTRIBUTING.md We ask new contributors to create issues and discuss with maintainers first before submitting PRs. This will ensure better experience for everyone, especially in case the suggested feature is not going to be accepted. This PR looks useful (from the description) and has a good chance to get accepted. I did not have a detailed look since the build fails. Please submit an issue describing the intent and we will take it from there. |
Codecov Report
@@ Coverage Diff @@
## master #609 +/- ##
==========================================
+ Coverage 75.32% 75.34% +0.02%
==========================================
Files 142 142
Lines 9721 9790 +69
==========================================
+ Hits 7322 7376 +54
- Misses 2075 2085 +10
- Partials 324 329 +5
Continue to review full report at Codecov.
|
Thank you @tigrannajaryan and apologies for missing the process. I filled the issue as #610 The PR is something I found useful for my purposes and thought it is worth to be shared with the community. It makes several changes to how the logging exporter was working currently and it focuses solely on tracing as of now. If you find it useful, I will be glad to extend it for metrics too or do any other improvements you find helpful |
The exporter outputs data in a more verbose format, which allows to easily inspect what spans are being passed in the console. Additionally, it includes sampling, so by default the console should never get too much data
Previously, there was only one effect loglevel of logging exporter. Currently, debug is much more verbose and should be used for... debugging. For other purposes, into is sufficient.
ff3199c
to
4cb20ef
Compare
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.
LGTM, except please bring back logging of config.Name().
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.
Thanks @pmm-sumo LGTM, just two very nit suggestions and please use the tag "exporter" to log config.Name()
Many thanks @tigrannajaryan and @pjanotti for the review. I brought back I was thinking about making similar PR for metrics too, what do you think? |
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.
Thanks @pmm-sumo!
That will be nice, just a warning that there are many PRs and we (or perhaps I) may be slow to reply. |
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.
Thank you.
* translatesfx: handle SA regex filters SA allows you to specify a regexp filter by wrapping it in forward slashes. This changes detects that and translates it into an expr expression. For example the SA directive: metricsToExclude: - metricName: /vsphere\.cpu_\w*_percent/ should translate into: processors: filter: metrics: exclude: match_type: expr expressions: - MetricName matches "vsphere\\.cpu_\\w*_percent" * translatesfx: don't consider a single '/' a regex filter
Description:
The exporter outputs data in a more verbose format when in debug mode, which allows to easily inspect what spans are being passed using the console.
Additionally, it includes sampling, so by default the console should never get too much data
The logger config is changed to use console encoding
Sample output:
Link to tracking Issue: #610
Testing: Basic unit tests for config and trace data added. Manually tested in an environment with data coming in various formats (Jaeger, Zipkin, OpenCensus)
Documentation: Exporters README updated