open-telemetry / open-telemetry/opentelemetry-python

Prometheus exporter: omit empty otel_scope_info and otel_target_info metrics

Open
#3,455 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

Description

otel_scope_info and target_info should now only be generated when scope attributes and resource attributes are non-empty.

From https://github.com/open-telemetry/opentelemetry-specification/pull/3660:

Prometheus exporters SHOULD generate an Info-typed
metric named otel_scope_info for each Instrumentation Scope with non-empty
scope attributes.

In SDK Prometheus (pull) exporters, resource attributes SHOULD be converted to
a single target_info metric
if the resource is not empty;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Prometheus exporter and the code that generates otel_scope_info and target_info metrics. Review the linked OpenTelemetry specification change and verify behavior for empty and non-empty scope and resource attributes. Done means empty attributes produce no corresponding metric, while non-empty attributes still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.