Telemetry provider PoC
Description:
This is a proof of concept in support of #4970.
A TelemetryProvider is defined to support overriding the telemetry on the Collector. A default implementation is provided, but alternatives can be provided to override telemetry providers and also to deal with #4971.
The TelemetryProvider interface has two methods: the SetupTelemetry and ZPages. The latter is needed since the span processor needs to be passed as part of the zpages server registration. This could be a separate, optional interface, similar to what happens now for ZPages on component.Host.
Link to tracking Issue: #4970
Codecov Report
Merging #5107 (ac30277) into main (2acc422) will decrease coverage by
0.03%. The diff coverage is82.22%.
@@ Coverage Diff @@
## main #5107 +/- ##
==========================================
- Coverage 90.57% 90.54% -0.04%
==========================================
Files 189 190 +1
Lines 11116 11143 +27
==========================================
+ Hits 10068 10089 +21
- Misses 826 830 +4
- Partials 222 224 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| service/collector.go | 73.61% <66.66%> (-2.29%) |
:arrow_down: |
| service/telemetry_provider.go | 90.00% <90.00%> (ø) |
|
| pdata/internal/common.go | 94.25% <0.00%> (-0.77%) |
:arrow_down: |
| exporter/exporterhelper/queued_retry.go | 99.27% <0.00%> (+2.91%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 2acc422...ac30277. Read the comment docs.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
I refactored this a bit to show how to skip GRPC logger as part of a 'test telemetry provider' and to adapt to main changes
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.
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.
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.
Closed as inactive. Feel free to reopen if this PR is still being worked on.
FWIW https://github.com/open-telemetry/opentelemetry-collector/pull/8111#issuecomment-1654148294 I recommend we lean on the OTel global providers instead of supporting a different way to inject those dependencies.