open-telemetry / open-telemetry/opentelemetry-ruby
Have `MetricReader#Collect` report a status instead of raw data
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
Spec requirement
MetricReader#Collect SHOULD report success/failure/timeout (sdk.md:1497-1523).
Current behavior
export/metric_reader.rb:21-23 (permalink) #collect returns whatever @metric_store.collect returns (an array of MetricData, not a status/result object) so there's no success/failure/timeout signal for callers.
Suggested fix
Wrap the collected data in a result object or add a parallel status-reporting return path. This would allow callers to distinguish a successful, but empty, collection from a failed one without changing the existing data-returning behavior that callers currently rely on.
Related rows in SPEC_COMPLIANCE_METRICS.md
SDK-55
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/export/metric_reader.rb, especially lines 21-23, and compare its current return behavior with the linked SDK specification section. Trace how callers use the collected MetricData array before choosing between a result object and a parallel status path. Done means callers can distinguish success, failure, and timeout, including successful empty collections, without breaking existing data-dependent callers.
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
- Mostly clear
- Newbie friendliness
- 48/100