From 1497916c2c16a9364ab92d9a71265d4f59efeac3 Mon Sep 17 00:00:00 2001 From: elramen <158566966+elramen@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:37:27 +0200 Subject: [PATCH] ref(metrics): Update type hints for tag values (#3156) Remove Tuple and List from the MetricTagValue type as these are not supported and might confuse the user. See getsentry/relay#3691 for more information. --- sentry_sdk/_types.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sentry_sdk/_types.py b/sentry_sdk/_types.py index 7ac85bad57..bd229977a5 100644 --- a/sentry_sdk/_types.py +++ b/sentry_sdk/_types.py @@ -17,7 +17,6 @@ from typing import Any from typing import Callable from typing import Dict - from typing import List from typing import Mapping from typing import NotRequired from typing import Optional @@ -173,14 +172,7 @@ MetricTagsInternal = Tuple[Tuple[str, str], ...] # External representation of tags as a dictionary. - MetricTagValue = Union[ - str, - int, - float, - None, - List[Union[int, str, float, None]], - Tuple[Union[int, str, float, None], ...], - ] + MetricTagValue = Union[str, int, float, None] MetricTags = Mapping[str, MetricTagValue] # Value inside the generator for the metric value.