Method: Sentry::Scope#update_from_options

Defined in:
lib/sentry/scope.rb

#update_from_options(contexts: nil, extra: nil, tags: nil, user: nil, level: nil, fingerprint: nil, attachments: nil, **options) ⇒ Array

Updates the scope’s data from the given options.

Parameters:

  • contexts (Hash) (defaults to: nil)
  • extras (Hash)
  • tags (Hash) (defaults to: nil)
  • user (Hash) (defaults to: nil)
  • level (String, Symbol) (defaults to: nil)
  • fingerprint (Array) (defaults to: nil)
  • attachments (Array<Attachment>) (defaults to: nil)

Returns:

  • (Array)
[View source]

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/sentry/scope.rb', line 139

def update_from_options(
  contexts: nil,
  extra: nil,
  tags: nil,
  user: nil,
  level: nil,
  fingerprint: nil,
  attachments: nil,
  **options
)
  self.contexts.merge!(contexts) if contexts
  self.extra.merge!(extra) if extra
  self.tags.merge!(tags) if tags
  self.user = user if user
  self.level = level if level
  self.fingerprint = fingerprint if fingerprint

  # Returns unsupported option keys so we can notify users.
  options.keys
end