@@ -53,7 +53,7 @@ class MetricExporter(ABC):
5353
5454 @abstractmethod
5555 def export (
56- self , metrics : Sequence [Metric ], ** kwargs
56+ self , metrics : Sequence [Metric ], * args , * *kwargs
5757 ) -> "MetricExportResult" :
5858 """Exports a batch of telemetry data.
5959
@@ -65,7 +65,7 @@ def export(
6565 """
6666
6767 @abstractmethod
68- def shutdown (self , ** kwargs ) -> None :
68+ def shutdown (self , * args , * *kwargs ) -> None :
6969 """Shuts down the exporter.
7070
7171 Called when the SDK is shut down.
@@ -90,14 +90,14 @@ def __init__(
9090 self .formatter = formatter
9191
9292 def export (
93- self , metrics : Sequence [Metric ], ** kwargs
93+ self , metrics : Sequence [Metric ], * args , * *kwargs
9494 ) -> MetricExportResult :
9595 for metric in metrics :
9696 self .out .write (self .formatter (metric ))
9797 self .out .flush ()
9898 return MetricExportResult .SUCCESS
9999
100- def shutdown (self , ** kwargs ) -> None :
100+ def shutdown (self , * args , * *kwargs ) -> None :
101101 pass
102102
103103
@@ -127,11 +127,11 @@ def get_metrics(self) -> List[Metric]:
127127 self ._metrics = []
128128 return metrics
129129
130- def _receive_metrics (self , metrics : Iterable [Metric ], ** kwargs ):
130+ def _receive_metrics (self , metrics : Iterable [Metric ], * args , * *kwargs ):
131131 with self ._lock :
132132 self ._metrics = list (metrics )
133133
134- def shutdown (self , ** kwargs ):
134+ def shutdown (self , * args , * *kwargs ):
135135 pass
136136
137137
@@ -197,7 +197,9 @@ def _ticker(self) -> None:
197197 # one last collection below before shutting down completely
198198 self .collect ()
199199
200- def _receive_metrics (self , metrics : Iterable [Metric ], ** kwargs ) -> None :
200+ def _receive_metrics (
201+ self , metrics : Iterable [Metric ], * args , ** kwargs
202+ ) -> None :
201203 if metrics is None :
202204 return
203205 token = attach (set_value (_SUPPRESS_INSTRUMENTATION_KEY , True ))
@@ -207,7 +209,7 @@ def _receive_metrics(self, metrics: Iterable[Metric], **kwargs) -> None:
207209 _logger .exception ("Exception while exporting metrics %s" , str (e ))
208210 detach (token )
209211
210- def shutdown (self , ** kwargs ):
212+ def shutdown (self , * args , * *kwargs ):
211213 def _shutdown ():
212214 self ._shutdown = True
213215
0 commit comments