Skip to content

Commit b535565

Browse files
committed
fix: Use ivar for kwarg default
1 parent 048f574 commit b535565

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metrics_sdk/lib/opentelemetry/sdk/metrics/instrument/synchronous_instrument.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ def initialize(name, unit, description, instrumentation_scope, meter_provider, a
2424
end
2525

2626
# @api private
27-
def register_with_new_metric_store(metric_store, aggregation: nil)
27+
def register_with_new_metric_store(metric_store, aggregation: @aggregation)
2828
ms = OpenTelemetry::SDK::Metrics::State::MetricStream.new(
2929
@name,
3030
@description,
3131
@unit,
3232
instrument_kind,
3333
@meter_provider,
3434
@instrumentation_scope,
35-
aggregation || @aggregation
35+
aggregation
3636
)
3737
@metric_streams << ms
3838
metric_store.add_metric_stream(ms)

0 commit comments

Comments
 (0)