Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metric methods should enforce number inputs #12164

Closed
3 tasks done
AbhiPrasad opened this issue May 22, 2024 · 0 comments · Fixed by #12165
Closed
3 tasks done

Metric methods should enforce number inputs #12164

AbhiPrasad opened this issue May 22, 2024 · 0 comments · Fixed by #12165
Assignees
Labels
Package: browser Issues related to the Sentry Browser SDK Type: Bug

Comments

@AbhiPrasad
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: browser Issues related to the Sentry Browser SDK Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants