@@ -202,7 +202,9 @@ def __init__(
202
202
self ._name = name
203
203
self ._version = version
204
204
self ._schema_url = schema_url
205
- self ._instrument_ids : Dict [str , str ] = {}
205
+ self ._instrument_ids : Dict [
206
+ str , Optional [MetricsInstrumentAdvisory ]
207
+ ] = {}
206
208
self ._instrument_ids_lock = Lock ()
207
209
208
210
@property
@@ -277,7 +279,7 @@ def create_counter(
277
279
name : str ,
278
280
unit : str = "" ,
279
281
description : str = "" ,
280
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
282
+ advisory : None = None ,
281
283
) -> Counter :
282
284
"""Creates a `Counter` instrument
283
285
@@ -294,7 +296,7 @@ def create_up_down_counter(
294
296
name : str ,
295
297
unit : str = "" ,
296
298
description : str = "" ,
297
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
299
+ advisory : None = None ,
298
300
) -> UpDownCounter :
299
301
"""Creates an `UpDownCounter` instrument
300
302
@@ -312,7 +314,7 @@ def create_observable_counter(
312
314
callbacks : Optional [Sequence [CallbackT ]] = None ,
313
315
unit : str = "" ,
314
316
description : str = "" ,
315
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
317
+ advisory : None = None ,
316
318
) -> ObservableCounter :
317
319
"""Creates an `ObservableCounter` instrument
318
320
@@ -425,7 +427,7 @@ def create_gauge( # type: ignore # pylint: disable=no-self-use
425
427
name : str ,
426
428
unit : str = "" ,
427
429
description : str = "" ,
428
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
430
+ advisory : None = None ,
429
431
) -> Gauge :
430
432
"""Creates a ``Gauge`` instrument
431
433
@@ -444,7 +446,7 @@ def create_observable_gauge(
444
446
callbacks : Optional [Sequence [CallbackT ]] = None ,
445
447
unit : str = "" ,
446
448
description : str = "" ,
447
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
449
+ advisory : None = None ,
448
450
) -> ObservableGauge :
449
451
"""Creates an `ObservableGauge` instrument
450
452
@@ -465,7 +467,7 @@ def create_observable_up_down_counter(
465
467
callbacks : Optional [Sequence [CallbackT ]] = None ,
466
468
unit : str = "" ,
467
469
description : str = "" ,
468
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
470
+ advisory : None = None ,
469
471
) -> ObservableUpDownCounter :
470
472
"""Creates an `ObservableUpDownCounter` instrument
471
473
@@ -514,7 +516,7 @@ def create_counter(
514
516
name : str ,
515
517
unit : str = "" ,
516
518
description : str = "" ,
517
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
519
+ advisory : None = None ,
518
520
) -> Counter :
519
521
with self ._lock :
520
522
if self ._real_meter :
@@ -528,7 +530,7 @@ def create_up_down_counter(
528
530
name : str ,
529
531
unit : str = "" ,
530
532
description : str = "" ,
531
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
533
+ advisory : None = None ,
532
534
) -> UpDownCounter :
533
535
with self ._lock :
534
536
if self ._real_meter :
@@ -545,7 +547,7 @@ def create_observable_counter(
545
547
callbacks : Optional [Sequence [CallbackT ]] = None ,
546
548
unit : str = "" ,
547
549
description : str = "" ,
548
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
550
+ advisory : None = None ,
549
551
) -> ObservableCounter :
550
552
with self ._lock :
551
553
if self ._real_meter :
@@ -579,7 +581,7 @@ def create_gauge(
579
581
name : str ,
580
582
unit : str = "" ,
581
583
description : str = "" ,
582
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
584
+ advisory : None = None ,
583
585
) -> Gauge :
584
586
with self ._lock :
585
587
if self ._real_meter :
@@ -594,7 +596,7 @@ def create_observable_gauge(
594
596
callbacks : Optional [Sequence [CallbackT ]] = None ,
595
597
unit : str = "" ,
596
598
description : str = "" ,
597
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
599
+ advisory : None = None ,
598
600
) -> ObservableGauge :
599
601
with self ._lock :
600
602
if self ._real_meter :
@@ -613,7 +615,7 @@ def create_observable_up_down_counter(
613
615
callbacks : Optional [Sequence [CallbackT ]] = None ,
614
616
unit : str = "" ,
615
617
description : str = "" ,
616
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
618
+ advisory : None = None ,
617
619
) -> ObservableUpDownCounter :
618
620
with self ._lock :
619
621
if self ._real_meter :
@@ -641,7 +643,7 @@ def create_counter(
641
643
name : str ,
642
644
unit : str = "" ,
643
645
description : str = "" ,
644
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
646
+ advisory : None = None ,
645
647
) -> Counter :
646
648
"""Returns a no-op Counter."""
647
649
_ , status = self ._register_instrument (
@@ -665,7 +667,7 @@ def create_gauge(
665
667
name : str ,
666
668
unit : str = "" ,
667
669
description : str = "" ,
668
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
670
+ advisory : None = None ,
669
671
) -> Gauge :
670
672
"""Returns a no-op Gauge."""
671
673
_ , status = self ._register_instrument (
@@ -689,7 +691,7 @@ def create_up_down_counter(
689
691
name : str ,
690
692
unit : str = "" ,
691
693
description : str = "" ,
692
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
694
+ advisory : None = None ,
693
695
) -> UpDownCounter :
694
696
"""Returns a no-op UpDownCounter."""
695
697
_ , status = self ._register_instrument (
@@ -714,7 +716,7 @@ def create_observable_counter(
714
716
callbacks : Optional [Sequence [CallbackT ]] = None ,
715
717
unit : str = "" ,
716
718
description : str = "" ,
717
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
719
+ advisory : None = None ,
718
720
) -> ObservableCounter :
719
721
"""Returns a no-op ObservableCounter."""
720
722
_ , status = self ._register_instrument (
@@ -770,7 +772,7 @@ def create_observable_gauge(
770
772
callbacks : Optional [Sequence [CallbackT ]] = None ,
771
773
unit : str = "" ,
772
774
description : str = "" ,
773
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
775
+ advisory : None = None ,
774
776
) -> ObservableGauge :
775
777
"""Returns a no-op ObservableGauge."""
776
778
_ , status = self ._register_instrument (
@@ -800,7 +802,7 @@ def create_observable_up_down_counter(
800
802
callbacks : Optional [Sequence [CallbackT ]] = None ,
801
803
unit : str = "" ,
802
804
description : str = "" ,
803
- advisory : Optional [ MetricsInstrumentAdvisory ] = None ,
805
+ advisory : None = None ,
804
806
) -> ObservableUpDownCounter :
805
807
"""Returns a no-op ObservableUpDownCounter."""
806
808
_ , status = self ._register_instrument (
0 commit comments