@@ -43,8 +43,8 @@ def initialize
4343 # @param description [optional String] an optional free-form text provided by user.
4444 #
4545 # @return [nil] after creation of counter, it will be stored in instrument_registry
46- def create_counter ( name , unit : nil , description : nil )
47- create_instrument ( :counter , name , unit , description , nil ) { COUNTER }
46+ def create_counter ( name , unit : nil , description : nil , ** advisory_parameters )
47+ create_instrument ( :counter , name , unit , description , nil , ** advisory_parameters ) { COUNTER }
4848 end
4949
5050 # Histogram is a synchronous Instrument which can be used to report arbitrary values that are likely
@@ -62,8 +62,8 @@ def create_counter(name, unit: nil, description: nil)
6262 # @param description [optional String] an optional free-form text provided by user.
6363 #
6464 # @return [nil] after creation of histogram, it will be stored in instrument_registry
65- def create_histogram ( name , unit : nil , description : nil )
66- create_instrument ( :histogram , name , unit , description , nil ) { HISTOGRAM }
65+ def create_histogram ( name , unit : nil , description : nil , ** advisory_parameters )
66+ create_instrument ( :histogram , name , unit , description , nil , ** advisory_parameters ) { HISTOGRAM }
6767 end
6868
6969 # Gauge is an synchronous Instrument which reports non-additive value(s)
@@ -80,8 +80,8 @@ def create_histogram(name, unit: nil, description: nil)
8080 # @param description [optional String] an optional free-form text provided by user.
8181 #
8282 # @return [nil] after creation of gauge, it will be stored in instrument_registry
83- def create_gauge ( name , unit : nil , description : nil )
84- create_instrument ( :gauge , name , unit , description , nil ) { GAUGE }
83+ def create_gauge ( name , unit : nil , description : nil , ** advisory_parameters )
84+ create_instrument ( :gauge , name , unit , description , nil , ** advisory_parameters ) { GAUGE }
8585 end
8686
8787 # UpDownCounter is a synchronous Instrument which supports increments and decrements.
@@ -97,8 +97,8 @@ def create_gauge(name, unit: nil, description: nil)
9797 # @param description [optional String] an optional free-form text provided by user.
9898 #
9999 # @return [nil] after creation of up_down_counter, it will be stored in instrument_registry
100- def create_up_down_counter ( name , unit : nil , description : nil )
101- create_instrument ( :up_down_counter , name , unit , description , nil ) { UP_DOWN_COUNTER }
100+ def create_up_down_counter ( name , unit : nil , description : nil , ** advisory_parameters )
101+ create_instrument ( :up_down_counter , name , unit , description , nil , ** advisory_parameters ) { UP_DOWN_COUNTER }
102102 end
103103
104104 # ObservableCounter is an asynchronous Instrument which reports monotonically
@@ -119,8 +119,8 @@ def create_up_down_counter(name, unit: nil, description: nil)
119119 # @param description [optional String] an optional free-form text provided by user.
120120 #
121121 # @return [nil] after creation of observable_counter, it will be stored in instrument_registry
122- def create_observable_counter ( name , callback :, unit : nil , description : nil )
123- create_instrument ( :observable_counter , name , unit , description , callback ) { OBSERVABLE_COUNTER }
122+ def create_observable_counter ( name , callback :, unit : nil , description : nil , ** advisory_parameters )
123+ create_instrument ( :observable_counter , name , unit , description , callback , ** advisory_parameters ) { OBSERVABLE_COUNTER }
124124 end
125125
126126 # ObservableGauge is an asynchronous Instrument which reports non-additive value(s)
@@ -142,8 +142,8 @@ def create_observable_counter(name, callback:, unit: nil, description: nil)
142142 # @param description [optional String] an optional free-form text provided by user.
143143 #
144144 # @return [nil] after creation of observable_gauge, it will be stored in instrument_registry
145- def create_observable_gauge ( name , callback :, unit : nil , description : nil )
146- create_instrument ( :observable_gauge , name , unit , description , callback ) { OBSERVABLE_GAUGE }
145+ def create_observable_gauge ( name , callback :, unit : nil , description : nil , ** advisory_parameters )
146+ create_instrument ( :observable_gauge , name , unit , description , callback , ** advisory_parameters ) { OBSERVABLE_GAUGE }
147147 end
148148
149149 # ObservableUpDownCounter is an asynchronous Instrument which reports additive value(s)
@@ -165,13 +165,13 @@ def create_observable_gauge(name, callback:, unit: nil, description: nil)
165165 # @param description [optional String] an optional free-form text provided by user.
166166 #
167167 # @return [nil] after creation of observable_up_down_counter, it will be stored in instrument_registry
168- def create_observable_up_down_counter ( name , callback :, unit : nil , description : nil )
169- create_instrument ( :observable_up_down_counter , name , unit , description , callback ) { OBSERVABLE_UP_DOWN_COUNTER }
168+ def create_observable_up_down_counter ( name , callback :, unit : nil , description : nil , ** advisory_parameters )
169+ create_instrument ( :observable_up_down_counter , name , unit , description , callback , ** advisory_parameters ) { OBSERVABLE_UP_DOWN_COUNTER }
170170 end
171171
172172 private
173173
174- def create_instrument ( kind , name , unit , description , callback )
174+ def create_instrument ( kind , name , unit , description , callback , ** )
175175 @mutex . synchronize do
176176 OpenTelemetry . logger . warn ( "duplicate instrument registration occurred for instrument #{ name } " ) if @instrument_registry . include? name
177177
0 commit comments