Skip to content

Metric methods should enforce number inputs #12164

Closed
@AbhiPrasad

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

Metadata

Metadata

Assignees

Labels

Package: browserIssues related to the Sentry Browser SDK

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions