open-telemetry / open-telemetry/opentelemetry-python
Prometheus exporter: omit empty otel_scope_info and otel_target_info metrics
Nobody has claimed this yet.
- 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 namedotel_scope_infofor each Instrumentation Scope with non-empty
scope attributes.
In SDK Prometheus (pull) exporters, resource attributes SHOULD be converted to
a singletarget_infometric
if the resource is not empty;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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