Protected_Attachments
Protected_Attributes
Protected_Array of breadcrumbs.
Protected Optional_The client on this scope
Protected_Contexts
Protected Optional_Conversation ID
Protected_Callback list that will be called during event processing.
Protected_Extra
Protected Optional_Fingerprint
Protected Optional_Contains the last event id of a captured event.
Protected Optional_Severity
Protected_Flag if notifying is happening.
Protected_Propagation Context for distributed tracing
Protected_Callback for client to receive scope changes.
Protected_A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get sent to Sentry
Protected Optional_Session
Protected_Tags
Protected Optional_Transaction Name
IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects. It's purpose is to assign a transaction to the scope that's added to non-transaction events.
Protected_User
Protected_This will be called on every set call.
Add an attachment to the scope.
Adds a breadcrumb to the scope. By default, the last 100 breadcrumbs are kept.
OptionalmaxBreadcrumbs: numberAdd an event processor that will be called before an event is sent.
Capture an exception for this scope.
Optionalhint: EventHintThe id of the captured Sentry event.
Capture a message for this scope.
Optionallevel: SeverityLevelOptionalhint: EventHintThe id of the captured message.
Clears the current scope and resets its properties. Note: The client will not be cleared.
Clear all attachments from the scope.
Clear all breadcrumbs from the scope.
Clone all data from this scope into a new scope.
Get the client assigned to this scope.
Get the last breadcrumb of the scope.
Get propagation context from the scope, used for distributed tracing
Get the data of this scope, which should be applied to an event during processing.
Get the session from the scope.
Get the user from this scope.
Get the ID of the last captured error event. This is generally only available on the isolation scope.
Sets an attribute onto the scope.
These attributes are currently applied to logs and metrics. In the future, they will also be applied to spans.
Important: For now, only strings, numbers and boolean attributes are supported, despite types allowing for more complex attribute types. We'll add this support in the future but already specify the wider type to avoid a breaking change in the future.
The attribute key.
the attribute value. You can either pass in a raw value, or an attribute
object with a value and an optional unit (if applicable to your attribute).
Sets attributes onto the scope.
These attributes are currently applied to logs and metrics. In the future, they will also be applied to spans.
Important: For now, only strings, numbers and boolean attributes are supported, despite types allowing for more complex attribute types. We'll add this support in the future but already specify the wider type to avoid a breaking change in the future.
The attributes to set on the scope. You can either pass in key-value pairs, or
an object with a value and an optional unit (if applicable to your attribute).
Update the client assigned to this scope. Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client, as well as manually created scopes.
Sets context data with the given name.
Data passed as context will be normalized. You can also pass null to unset the context.
Note that context data will not be merged - calling setContext will overwrite an existing context with the same key.
Set the conversation ID for this scope.
Set to null to unset the conversation ID.
Set a single key:value extra entry that will be sent as extra data with the event.
Set an object that will be merged into existing extra on the scope, and will be sent as extra data with the event.
Sets the fingerprint on the scope to send with the events.
Fingerprint to group events in Sentry.
Set the ID of the last captured error event. This is generally only captured on the isolation scope.
Add propagation context to the scope, used for distributed tracing
Add data which will be accessible during event processing but won't get sent to Sentry.
Set a single tag that will be sent as tags data with the event.
Set an object that will be merged into existing tags on the scope, and will be sent as tags data with the event.
Sets the transaction name on the scope so that the name of e.g. taken server route or the page location is attached to future events.
IMPORTANT: Calling this function does NOT change the name of the currently active
root span. If you want to change the name of the active root span, use
Sentry.updateSpanName(rootSpan, 'new name') instead.
By default, the SDK updates the scope's transaction name automatically on sensible occasions, such as a page navigation or when handling a new request on the server.
Optionalname: stringUpdates the scope with provided data. Can work in three variations:
OptionalcaptureContext: CaptureContext
Holds additional event information.