-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/core
SDK Version
10.24.0
Framework Version
n/a
Link to Sentry event
n/a
Reproduction Example/SDK Setup
N/A
Steps to Reproduce
Sentry.setTag('tag_1', {foo: 'bar'})
Expected Result
Only tags with primitive values are sent. Object or array values should be discarded or stringified.
Actual Result
Tags with object/array values are sent
Additional Context
To be clear: Our type definitions allow only Primitive values. But in non-TS applications, users can pass in arbitrary data without necessarily being aware of this limitations.
We only document string values in our docs, so allowing primitives is already a superset here. But this seems to work well enough in the product.
However, I don't think we should send objects/arrays, etc. Especially, given that we had a test against that, which unfortunately didn't catch the violation (#18162)
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.