Method: Sentry.configure_scope

Defined in:
lib/sentry-ruby.rb

.configure_scope {|scope| ... } ⇒ void

This method returns an undefined value.

Takes a block and yields the current active scope.

Examples:

Sentry.configure_scope do |scope|
  scope.set_tags(foo: "bar")
end

Sentry.capture_message("test message") # this event will have tags { foo: "bar" }

Yield Parameters:

[View source]

381
382
383
384
# File 'lib/sentry-ruby.rb', line 381

def configure_scope(&block)
  return unless initialized?
  get_current_hub.configure_scope(&block)
end