vue-raven
vue-raven copied to clipboard
add setContext functionality to this.$raven
Hello I just added your plugin and thought being able to set user context through this.$raven. But unfortunately its not possible.
this.$raven.setUserContext(USER)
what is the recommended way to do this? Thanks
Additionally you can provide arbitrary key/value pairs beyond the reserved names and those will be stored with the user. Capturing the User
the USER parameter is an object?
@anteriovieira yes. I am talking about this functionality: https://docs.sentry.io/learn/context/ I'd like to set the user context after login/logout to keep track which user is causing the trouble.
Hi @dohomi , sorry for the delay in answering, I know it's been a long time so I'd like to know what your progress was.
Why were not you able to define the context? What happened?
@anteriovieira I am importing currently Raven and setting the context. Your plugin does not provide the functionality to do this directly with this.$raven.setContext()
Hi @dohomi , Can you give me an example of your code? this.$raven is just a reference to Raven, so I do not understand how this does not work.
https://github.com/anteriovieira/vue-raven/blob/master/src/index.js#L56
If the disableReport option is set to false, Vue.$raven does not have any functionality: https://github.com/anteriovieira/vue-raven/blob/master/src/index.js#L22.