Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use TemporalitySelector instead of func(view.InstrumentKind) metricdata.Temporality #3050

Merged
merged 2 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/metric/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

type reader struct {
producer producer
temporalityFunc func(view.InstrumentKind) metricdata.Temporality
temporalityFunc TemporalitySelector
aggregationFunc AggregationSelector
collectFunc func(context.Context) (metricdata.ResourceMetrics, error)
forceFlushFunc func(context.Context) error
Expand Down
4 changes: 2 additions & 2 deletions sdk/metric/manual_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type manualReader struct {
producer atomic.Value
shutdownOnce sync.Once

temporalitySelector func(view.InstrumentKind) metricdata.Temporality
temporalitySelector TemporalitySelector
aggregationSelector AggregationSelector
}

Expand Down Expand Up @@ -112,7 +112,7 @@ func (mr *manualReader) Collect(ctx context.Context) (metricdata.ResourceMetrics

// manualReaderConfig contains configuration options for a ManualReader.
type manualReaderConfig struct {
temporalitySelector func(view.InstrumentKind) metricdata.Temporality
temporalitySelector TemporalitySelector
aggregationSelector AggregationSelector
}

Expand Down
4 changes: 2 additions & 2 deletions sdk/metric/periodic_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
type periodicReaderConfig struct {
interval time.Duration
timeout time.Duration
temporalitySelector func(view.InstrumentKind) metricdata.Temporality
temporalitySelector TemporalitySelector
aggregationSelector AggregationSelector
}

Expand Down Expand Up @@ -141,7 +141,7 @@ type periodicReader struct {
timeout time.Duration
exporter Exporter

temporalitySelector func(view.InstrumentKind) metricdata.Temporality
temporalitySelector TemporalitySelector
aggregationSelector AggregationSelector

wg sync.WaitGroup
Expand Down