Skip to content

Misleading set metric value type hint #3038

Closed

Description

@elramen

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2

Steps to Reproduce

  1. 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].

  2. 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.

Activity

  1. self-assigned this
    on May 2, 2024
  2. added a commit that references this issue on May 14, 2024
    cc11c0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions