@@ -35,7 +35,7 @@ def add_metric_reader(metric_reader)
35
35
end
36
36
end
37
37
38
- def create_instrument ( kind , name , unit , description , callback )
38
+ def create_instrument ( kind , name , unit , description , callback , ** options )
39
39
raise InstrumentNameError if name . nil?
40
40
raise InstrumentNameError if name . empty?
41
41
raise InstrumentNameError unless NAME_REGEX . match? ( name )
@@ -44,12 +44,12 @@ def create_instrument(kind, name, unit, description, callback)
44
44
45
45
super do
46
46
case kind
47
- when :counter then OpenTelemetry ::SDK ::Metrics ::Instrument ::Counter . new ( name , unit , description , @instrumentation_scope , @meter_provider )
47
+ when :counter then OpenTelemetry ::SDK ::Metrics ::Instrument ::Counter . new ( name , unit , description , @instrumentation_scope , @meter_provider , ** options )
48
48
when :observable_counter then OpenTelemetry ::SDK ::Metrics ::Instrument ::ObservableCounter . new ( name , unit , description , callback , @instrumentation_scope , @meter_provider )
49
- when :gauge then OpenTelemetry ::SDK ::Metrics ::Instrument ::Gauge . new ( name , unit , description , @instrumentation_scope , @meter_provider )
50
- when :histogram then OpenTelemetry ::SDK ::Metrics ::Instrument ::Histogram . new ( name , unit , description , @instrumentation_scope , @meter_provider )
49
+ when :gauge then OpenTelemetry ::SDK ::Metrics ::Instrument ::Gauge . new ( name , unit , description , @instrumentation_scope , @meter_provider , ** options )
50
+ when :histogram then OpenTelemetry ::SDK ::Metrics ::Instrument ::Histogram . new ( name , unit , description , @instrumentation_scope , @meter_provider , ** options )
51
51
when :observable_gauge then OpenTelemetry ::SDK ::Metrics ::Instrument ::ObservableGauge . new ( name , unit , description , callback , @instrumentation_scope , @meter_provider )
52
- when :up_down_counter then OpenTelemetry ::SDK ::Metrics ::Instrument ::UpDownCounter . new ( name , unit , description , @instrumentation_scope , @meter_provider )
52
+ when :up_down_counter then OpenTelemetry ::SDK ::Metrics ::Instrument ::UpDownCounter . new ( name , unit , description , @instrumentation_scope , @meter_provider , ** options )
53
53
when :observable_up_down_counter then OpenTelemetry ::SDK ::Metrics ::Instrument ::ObservableUpDownCounter . new ( name , unit , description , callback , @instrumentation_scope , @meter_provider )
54
54
end
55
55
end
0 commit comments