@@ -53,7 +53,7 @@ class MetricExporter(ABC):
53
53
54
54
@abstractmethod
55
55
def export (
56
- self , metrics : Sequence [Metric ], ** kwargs
56
+ self , metrics : Sequence [Metric ], * args , * *kwargs
57
57
) -> "MetricExportResult" :
58
58
"""Exports a batch of telemetry data.
59
59
@@ -65,7 +65,7 @@ def export(
65
65
"""
66
66
67
67
@abstractmethod
68
- def shutdown (self , ** kwargs ) -> None :
68
+ def shutdown (self , * args , * *kwargs ) -> None :
69
69
"""Shuts down the exporter.
70
70
71
71
Called when the SDK is shut down.
@@ -90,14 +90,14 @@ def __init__(
90
90
self .formatter = formatter
91
91
92
92
def export (
93
- self , metrics : Sequence [Metric ], ** kwargs
93
+ self , metrics : Sequence [Metric ], * args , * *kwargs
94
94
) -> MetricExportResult :
95
95
for metric in metrics :
96
96
self .out .write (self .formatter (metric ))
97
97
self .out .flush ()
98
98
return MetricExportResult .SUCCESS
99
99
100
- def shutdown (self , ** kwargs ) -> None :
100
+ def shutdown (self , * args , * *kwargs ) -> None :
101
101
pass
102
102
103
103
@@ -127,11 +127,11 @@ def get_metrics(self) -> List[Metric]:
127
127
self ._metrics = []
128
128
return metrics
129
129
130
- def _receive_metrics (self , metrics : Iterable [Metric ], ** kwargs ):
130
+ def _receive_metrics (self , metrics : Iterable [Metric ], * args , * *kwargs ):
131
131
with self ._lock :
132
132
self ._metrics = list (metrics )
133
133
134
- def shutdown (self , ** kwargs ):
134
+ def shutdown (self , * args , * *kwargs ):
135
135
pass
136
136
137
137
@@ -197,7 +197,9 @@ def _ticker(self) -> None:
197
197
# one last collection below before shutting down completely
198
198
self .collect ()
199
199
200
- def _receive_metrics (self , metrics : Iterable [Metric ], ** kwargs ) -> None :
200
+ def _receive_metrics (
201
+ self , metrics : Iterable [Metric ], * args , ** kwargs
202
+ ) -> None :
201
203
if metrics is None :
202
204
return
203
205
token = attach (set_value (_SUPPRESS_INSTRUMENTATION_KEY , True ))
@@ -207,7 +209,7 @@ def _receive_metrics(self, metrics: Iterable[Metric], **kwargs) -> None:
207
209
_logger .exception ("Exception while exporting metrics %s" , str (e ))
208
210
detach (token )
209
211
210
- def shutdown (self , ** kwargs ):
212
+ def shutdown (self , * args , * *kwargs ):
211
213
def _shutdown ():
212
214
self ._shutdown = True
213
215
0 commit comments