open-telemetry / open-telemetry/opentelemetry-ruby

Add a `MetricProducer` interface

Open
#2,356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement metrics spec-compliance spec:stable
Dominant language
Ruby
Stars
606
Forks
301
Avg merge
3d 19h
Merged PRs (30d)
42

Description

Spec requirement

A MetricProducer interface bridges third-party metric sources into a MetricReader via Produce; it SHOULD accept AggregationTemporality configuration (sdk.md:1818-1880).

Current behavior

No MetricProducer class/interface exists in metrics_sdk. Third-party metric sources can't be plugged into a MetricReader alongside SDK-collected data.

Suggested fix

Add a MetricProducer duck-type interface (a #produce/#collect-style method returning MetricData) and a way to register one or more MetricProducers on a MetricReader so their output is merged with SDK-collected data at Collect time.

Related rows in SPEC_COMPLIANCE_METRICS.md

SDK-60

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 reading the linked metrics SDK specification section, then inspect the existing MetricReader and Collect implementation in metrics_sdk. Determine how a MetricProducer is registered and how its MetricData is merged with SDK-collected data at collection time. Done means third-party metric sources can produce data through MetricReader and SDK-60 is addressed in SPEC_COMPLIANCE_METRICS.md.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.