You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write sentry_sdk.metrics.set and hover over set to see that the type hint for value is MetricValue. Go to the definition of MetricValue to see its definition: Union[int, float, str].
Emit a set metric two times using the same metric name but values that differ in the decimals, e.g., sentry_sdk.metrics.set("test", 1.2)
sentry_sdk.metrics.set("test", 1.6)
Expected Result
Metric shows unique count of 2 in the sentry.io dashboard.
Actual Result
Metric shows unique count of 1 in the sentry.io dashboard.
The text was updated successfully, but these errors were encountered:
Remove MetricValue from the set metric's value type hint. MetricValue is a union that includes floatwhich is correct based on how other parts of the code uses MetricValue. However, as floats are intentionally floored for set metrics, the current type hint might be confusing for a user as it looks like floats would work as unique values in a set.
FixesGH-3038
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2
Steps to Reproduce
Write sentry_sdk.metrics.set and hover over set to see that the type hint for value is MetricValue. Go to the definition of MetricValue to see its definition: Union[int, float, str].
Emit a set metric two times using the same metric name but values that differ in the decimals, e.g., sentry_sdk.metrics.set("test", 1.2)
sentry_sdk.metrics.set("test", 1.6)
Expected Result
Metric shows unique count of 2 in the sentry.io dashboard.
Actual Result
Metric shows unique count of 1 in the sentry.io dashboard.
The text was updated successfully, but these errors were encountered: