Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add setContext functionality to this.$raven #9

Open
dohomi opened this issue Aug 6, 2018 · 7 comments
Open

add setContext functionality to this.$raven #9

dohomi opened this issue Aug 6, 2018 · 7 comments

Comments

@dohomi
Copy link

dohomi commented Aug 6, 2018

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

@anteriovieira
Copy link
Owner

anteriovieira commented Aug 6, 2018

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?

@dohomi
Copy link
Author

dohomi commented Aug 7, 2018

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

@anteriovieira
Copy link
Owner

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.

@anteriovieira
Copy link
Owner

Why were not you able to define the context? What happened?

@dohomi
Copy link
Author

dohomi commented Sep 18, 2018

@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()

@anteriovieira
Copy link
Owner

anteriovieira commented Sep 18, 2018

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

@sisou
Copy link
Contributor

sisou commented Nov 27, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants