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

[obsreport] Replace Prometheus namespace with metrics prefix

Open dmitryax opened this issue 3 years ago • 2 comments

"otelcol" part of the exposed metrics that is set as Prometheus namespace is replaced the same explicit metrics prefix. This change brings names consistency between metrics that can be reported with enabled or disabled "telemetry.useOtelForInternalMetrics" feature gate.

Resolves https://github.com/open-telemetry/opentelemetry-collector/issues/5882

dmitryax avatar Aug 21 '22 16:08 dmitryax

Codecov Report

Merging #5939 (0bb640b) into main (f0d69d6) will decrease coverage by 0.00%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5939      +/-   ##
==========================================
- Coverage   91.93%   91.93%   -0.01%     
==========================================
  Files         200      200              
  Lines       12406    12404       -2     
==========================================
- Hits        11406    11404       -2     
  Misses        789      789              
  Partials      211      211              
Impacted Files Coverage Δ
exporter/exporterhelper/obsreport.go 100.00% <100.00%> (ø)
obsreport/obsreport_exporter.go 100.00% <100.00%> (ø)
obsreport/obsreport_receiver.go 100.00% <100.00%> (ø)
obsreport/obsreport_scraper.go 100.00% <100.00%> (ø)
obsreport/obsreporttest/obsreporttest.go 95.62% <100.00%> (ø)
service/internal/telemetry/process_telemetry.go 71.55% <100.00%> (ø)
service/telemetry.go 90.25% <100.00%> (-0.13%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 21 '22 17:08 codecov[bot]

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

github-actions[bot] avatar Sep 05 '22 04:09 github-actions[bot]

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

github-actions[bot] avatar Sep 28 '22 04:09 github-actions[bot]

This can also be accomplished by wrapping the prometheus.Registry before registering the otel-go prom exporter's Collector, which would not break any additional metric: https://github.com/open-telemetry/opentelemetry-collector/pull/6222/files#diff-52da5566fa270d6a253f7a301b66f4a1dbda7c2c42f3781f8357efe7f08dff10R255

edit: see https://github.com/open-telemetry/opentelemetry-collector/pull/6223

paivagustavo avatar Oct 03 '22 18:10 paivagustavo

#6223 closes this

bogdandrutu avatar Oct 04 '22 22:10 bogdandrutu