Skip to content

Commit 1110e33

Browse files
committed
chore: Add type for metric units
1 parent 121c9d2 commit 1110e33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry_sdk/_types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ class SDKInfo(TypedDict):
256256
)
257257

258258
MetricType = Literal["counter", "gauge", "distribution"]
259+
MetricUnit = Union[DurationUnit, InformationUnit]
259260

260261
Metric = TypedDict(
261262
"Metric",
@@ -266,7 +267,7 @@ class SDKInfo(TypedDict):
266267
"name": str,
267268
"type": MetricType,
268269
"value": float,
269-
"unit": Optional[str],
270+
"unit": Optional[MetricUnit],
270271
"attributes": Attributes,
271272
},
272273
)

0 commit comments

Comments
 (0)