logo
pub struct Scope { /* private fields */ }
Expand description

Holds contextual data for the current scope.

The scope is an object that can be cloned efficiently and stores data that is locally relevant to an event. For instance the scope will hold recorded breadcrumbs and similar information.

The scope can be interacted with in two ways:

  1. the scope is routinely updated with information by functions such as add_breadcrumb which will modify the currently top-most scope.
  2. the topmost scope can also be configured through the configure_scope method.

Note that the scope can only be modified but not inspected. Only the client can use the scope to extract information currently.

Implementations

Clear the scope.

By default a scope will inherit all values from the higher scope. In some situations this might not be what a user wants. Calling this method will wipe all data contained within.

Deletes current breadcrumbs from the scope.

Sets a level override.

Sets the fingerprint.

Sets the transaction.

Sets the user for the current scope.

Sets a tag to a specific value.

Removes a tag.

If the tag is not set, does nothing.

Sets a context for a key.

Removes a context for a key.

Sets a extra to a specific value.

Removes a extra.

Add an event processor to the scope.

Adds an attachment to the scope

Clears attachments from the scope

Applies the contained scoped data to fill an event.

Set the given TransactionOrSpan as the active span for this scope.

Returns the currently active span.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.