question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setTagsContext doesn't set tags properly

See original GitHub issue

What 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'
sentry

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:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kamilogorekcommented, Dec 4, 2017

@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-L22

1reaction
kamilogorekcommented, Dec 4, 2017

That’s exactly what’s happening. I’ll try to send a PR to create more meaningful message so it’s more obvious next time 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found