diff --git a/sentry_sdk/_types.py b/sentry_sdk/_types.py index a39e27d884..0ae3e653a7 100644 --- a/sentry_sdk/_types.py +++ b/sentry_sdk/_types.py @@ -256,6 +256,7 @@ class SDKInfo(TypedDict): ) MetricType = Literal["counter", "gauge", "distribution"] + MetricUnit = Union[DurationUnit, InformationUnit, str] Metric = TypedDict( "Metric", @@ -266,7 +267,7 @@ class SDKInfo(TypedDict): "name": str, "type": MetricType, "value": float, - "unit": Optional[str], + "unit": Optional[MetricUnit], "attributes": Attributes, }, )