-
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
[telemetry] Add ability to set service.name for spans emitted by the Collector #10490
[telemetry] Add ability to set service.name for spans emitted by the Collector #10490
Conversation
@codeboten, this is in draft for two reasons:
|
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 for taking this on @jpkrohling. Yes this is roughly what I had in mind. Note that in a later version of the config library, the service name is treated as any other attributes so the conversion between the collector Resource and the config package's Resource should be simpler.
Depending if this merges before or after #10545, there will be changes required |
That one can come first, it's simpler and the changes required for this one have to be applied anyway either here or there. |
eaa888c
to
92655e2
Compare
I looked at the tests, and I'm not sure what can be done to test this: the only exporters available are console, OTLP, and Zipkin. While I could spin up an OTLP test server locally, I think it's more than what would be reasonable for this test. Can you think of another solution? |
If you've manually tested the change, i would suggest opening a follow up issue to add service test w/ mock OTLP receivers, as I think we should at least ensure that the data remains consistent as we make future changes. Something like https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlpexporter/otlp_test.go might be a helpful inspiration |
Created: #10596 |
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
0395120
to
1284459
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10490 +/- ##
=======================================
Coverage 92.34% 92.34%
=======================================
Files 395 395
Lines 18686 18698 +12
=======================================
+ Hits 17255 17267 +12
Misses 1070 1070
Partials 361 361 ☔ View full report in Codecov by Sentry. |
@jpkrohling is it possible for telemetry to be received/processed recursively by the collector itself? And could it be the default behavior? |
The default behavior does not export any spans, and yes, it is possible for the snake to eat its own tail. I remember seeing recommendations to users to NOT do that, as it would end up with endless loops. Whenever possible, I mention that the monitor should never be the subject under monitoring. |
Description
This PR bridges the config that is exposed to Collector users to the internal format expected by the config helpers around the tracer provider.
Link to tracking issue
Fixes #10489
Testing
Manual testing performed.
Config:
Sent this telemetry to the collector:
telemetrygen traces --traces 1 --otlp-insecure --otlp-attributes='cookbook="own-telemetry"'
Resulting in this:
Documentation
None.
Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de