opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Telemetry provider PoC

Open mx-psi opened this issue 3 years ago • 8 comments

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

mx-psi avatar Mar 28 '22 21:03 mx-psi

Codecov Report

Merging #5107 (ac30277) into main (2acc422) will decrease coverage by 0.03%. The diff coverage is 82.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 data Powered by Codecov. Last update 2acc422...ac30277. Read the comment docs.

codecov[bot] avatar Mar 28 '22 21:03 codecov[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Apr 20 '22 03:04 github-actions[bot]

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

mx-psi avatar Apr 29 '22 10:04 mx-psi

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar May 14 '22 03:05 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Jun 07 '22 03:06 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Jun 22 '22 03:06 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Jul 12 '22 03:07 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Jul 27 '22 03:07 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Aug 13 '22 03:08 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Aug 27 '22 03:08 github-actions[bot]

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.

jmacd avatar Jul 27 '23 18:07 jmacd