open-telemetry / open-telemetry/opentelemetry-python
[TC Review] Some Metric View Conflict error messages are missing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
The conflict detection code for metric views in python is lacking a few features / could use some cleanup for user friendliness.
First - this code checks for conflicting definitions of views. However, it's still useful to give users a warning when two views are defined with mismatched descriptions. You still that case to work, but you want to tell the user they have mismatched descriptions in case there's some underlying error.
Second - The code today only looks for conflicts after selecting on instrument. It would fail to detect view conflicts from instrument renames.
For example:
- Instrument Counter "foo", w/ View rename to "foo_bar"
- Instrument Histogram "foo_bar"
I have an actual conflict here, but I'll never get an error message.
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 with opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py around line 62, where conflicting view definitions are checked. Trace how instrument selection and view renames are handled, then verify that mismatched descriptions produce a warning and that renamed instruments are included in conflict detection. Done means both cases report useful diagnostics without preventing valid operation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100