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

Submit a context without using a scope #1101

Open
andyhansen opened this issue Jul 26, 2022 · 0 comments
Open

Submit a context without using a scope #1101

andyhansen opened this issue Jul 26, 2022 · 0 comments

Comments

@andyhansen
Copy link

andyhansen commented Jul 26, 2022

I recently found out about the top level context variable which allows you to set a variable which can be searched with context:variable-value. This would be perfect for us to use as a way of storing which queue had the error, so that we can easily find all errors it's been having.

Unfortunately I can't find a way to include this variable with the error via the Ruby SDK without using a scope. At first I thought the custom_data_method_context was the answer to my problems, but I quickly realised that this was (of course) used by custom_data_method only.

I tested locally and found that I was able to get what I wanted if I could set the context when building the item, but that's a bit deep into the gem for me to make a change unfortunately.

Is there a way of setting this value when sending an individual Rollbar without using a scope? I will use a scope if I have to, but it unfortunately makes some of our abstractions more complex than I'd like.

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

No branches or pull requests

2 participants