setTagsContext doesn't set tags properly
See original GitHub issueWhat is the current behavior?
When using Raven.setTagsContext
to set tags in a global context, they are not properly passed to Sentry, and an error shows up in the error report stating Discarded invalid value for parameter 'tags'
What is the expected behavior?
The error report correctly shows up in Sentry.
Which versions of Raven.js, and which browser and OS are affected by this issue? Did this work in previous versions of Raven.js? Are you using the CDN (http://ravenjs.com)? Are you using hosted Sentry or on-premises? If on-premises, which version (e.g. 8.7.0)?
Following code reproduces this error, using hosted Sentry:
Raven.config("https://{public_key}@sentry.io/{app_id}").install()
Raven.setTagsContext({ release: "test version" });
throw new Error();
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Usage
If you need to remove a tag, use getContext to get the current context value, call setTagsContext with no parameters to remove all...
Read more >@sentry/types | Yarn - Package Manager
Set a global tag. Old: Raven.setTagsContext({ key: 'value' });. New: Sentry.configureScope((scope) => { scope.setTag('key', 'value'); }); ...
Read more >raven-js Documentation
Now need to set up Raven.js to use your Sentry DSN: Raven.config('___PUBLIC_DSN___').install(). At this point, Raven is ready to capture any ...
Read more >raven-js/CHANGELOG.md
102, * BUGFIX: Correctly increment trimHeadFrames in captureMessage (#1224) ... 655, * NEW: `Raven.set{Extra,Tags}Context(ctx)` now merges with existing ...
Read more >Firebase phone auth doesn't work on lineageos
... service: Sentry, action: setTagsContext, actionArgs: [{}] 05-26 13:23:52.171 6307 6529 V Capacitor/Plugin: To native (Cordova plugin): ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Valandur also for the reference, here’s a list of protected tags –
'release', 'dist', 'user', 'filename', 'function'
– https://github.com/getsentry/sentry/blob/master/src/sentry/tagstore/base.py#L19-L22That’s exactly what’s happening. I’ll try to send a PR to create more meaningful message so it’s more obvious next time 😃