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

Added the ability to send stash for resources #481

Merged
merged 3 commits into from
May 9, 2019
Merged

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented May 9, 2019

This stash can be accessed from performance filters.

query_info = { query: '...', ...}
stash = { request_id: 123 }
Airbrake.notify_query(query_info, stash)
Airbrake.add_performance_filter do |resource|
  do_something if resource.stash[:request_id] == 123
end

@kyrylo kyrylo force-pushed the resource-stash branch 3 times, most recently from 870b680 to 66b6c76 Compare May 9, 2019 16:08
kyrylo added 3 commits May 9, 2019 19:11
Query, Request, PerformanceBreakdown can now stash data.
This stash can be accessed from performance filters.

```ruby
query_info = { query: '...', ...}
stash = { request_id: 123 }
Airbrake.notify_query(query_info, stash)
```

```ruby
Airbrake.add_performance_filter do |resource|
  do_something if resource.stash[:request_id] == 123
end
```
@kyrylo kyrylo force-pushed the resource-stash branch from 66b6c76 to 3e3be1b Compare May 9, 2019 16:11
@kyrylo kyrylo merged commit cfbc092 into master May 9, 2019
@kyrylo kyrylo deleted the resource-stash branch May 9, 2019 16:13
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

Successfully merging this pull request may close these issues.

1 participant