We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 866d36d commit c34270cCopy full SHA for c34270c
platform-includes/enriching-events/set-context/ruby.rails.mdx
@@ -0,0 +1,15 @@
1
+```ruby
2
+Sentry.configure_scope do |scope|
3
+ scope.set_context(
4
+ 'character',
5
+ {
6
+ name: 'Mighty Fighter',
7
+ age: 19,
8
+ attack_type: 'melee'
9
+ }
10
+ )
11
+end
12
+```
13
+
14
+In Rails, the best place to do this is usually in a `before_action` hook in your controller or somewhere in your model logic.
15
+Any data set in `configure_scope` will be shared and isolated across a single request/response cycle.
0 commit comments