Skip to content

Metric methods should enforce number inputs #12164

Description

@AbhiPrasad

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

8.2.1

Framework Version

No response

Link to Sentry event

No response

SDK Setup

Sentry.init(...)

Steps to Reproduce

Sentry.metrics.increment('mycounter', '1');
Sentry.metrics.increment('mycounter', '1');
Sentry.metrics.increment('mycounter', '1');
Sentry.metrics.increment('mycounter', '1');

Expected Result

It should either not work with strings, or call parseInt on the string.

Actual Result

mycounter@none:1111|c|T1716382425

Activity

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