open-telemetry / open-telemetry/opentelemetry-ruby
Add missing View selection/stream-config fields (`meter_schema_url`, `description`, `exemplar_reservoir`) and a conflicting-identity warning
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
Spec requirement
View instrument-selection criteria MUST accept meter_schema_url alongside name/type/unit/meter_name/meter_version (sdk.md:285-358, Instrument selection criteria). Stream configuration MUST accept description and exemplar_reservoir overrides (sdk.md:359-461). Custom ExemplarReservoirs also must be configurable per-View (sdk.md:1378-1385). Measurement processing SHOULD warn on conflicting metric identities when multiple Views collide on the same stream name (sdk.md:462-523, Measurement processing).
Current behavior
view/registered_view.rb:26-32 (permalink) implements name (with wildcard support), type, unit, meter_name, meter_version as additive selection criteria, but meter_schema_url isn't read. The same file has no description or exemplar_reservoir accessor, so those stream-config overrides can only be set at instrument-creation time, not per-View. Independent-mode View application (state/metric_stream.rb:56-64 (permalink)) emits no warning when multiple Views would collide on the same stream name.
Suggested fix
Add meter_schema_url as an additive selection criterion, and description/exemplar_reservoir as stream-config overrides, to RegisteredView. Add a warning log when MetricStream construction detects more than one matching View producing the same stream name.
Related rows in SPEC_COMPLIANCE_METRICS.md
SDK-12, SDK-13, SDK-53, SDK-14
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 metrics_sdk/lib/opentelemetry/sdk/metrics/view/registered_view.rb and state/metric_stream.rb, then compare their behavior with the linked metrics SDK specification sections. Confirm that View selection accepts meter_schema_url, stream configuration supports description and exemplar_reservoir, and conflicting stream names produce a warning during MetricStream construction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100