Package io.sentry
Class NoOpScope
java.lang.Object
io.sentry.NoOpScope
- All Implemented Interfaces:
IScope
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(@NotNull Attachment attachment) Adds an attachment to the Scope's list of attachments.void
addBreadcrumb
(@NotNull Breadcrumb breadcrumb) Adds a breadcrumb to the breadcrumbs queue It also executes the BeforeBreadcrumb callback if setvoid
addBreadcrumb
(@NotNull Breadcrumb breadcrumb, @Nullable Hint hint) Adds a breadcrumb to the breadcrumbs queue.void
addEventProcessor
(@NotNull EventProcessor eventProcessor) Adds an event processor to the Scope's event processors listvoid
assignTraceContext
(@NotNull SentryEvent event) void
bindClient
(@NotNull ISentryClient client) void
clear()
Resets the Scope to its default statevoid
Clear all attachments.void
Clear all the breadcrumbsvoid
void
Clears the transaction.@NotNull IScope
clone()
Clones the Scope@Nullable Session
Ends a session, unbinds it from the scope and returns it.@NotNull List<Attachment>
Returns the Scopes's attachments@NotNull Queue<Breadcrumb>
Returns the Scope's breadcrumbs queue@NotNull ISentryClient
@NotNull Contexts
Returns the Scope's contexts@NotNull List<EventProcessor>
Returns the Scope's event processors@NotNull List<io.sentry.internal.eventprocessor.EventProcessorAndOrder>
Returns the Scope's extra mapReturns the Scope's fingerprint liststatic NoOpScope
@NotNull SentryId
@Nullable SentryLevel
getLevel()
@NotNull SentryOptions
@NotNull PropagationContext
@NotNull SentryId
Returns the Scope's current replay_id, previously set byIScope.setReplayId(SentryId)
@Nullable Request
Returns the Scope's request@Nullable String
Returns the Scope's current screen, previously set byIScope.setScreen(String)
@Nullable Session
@Nullable ISpan
getSpan()
Returns current active Span or Transaction.getTags()
Returns the Scope's tags@Nullable ITransaction
Returns active transaction or null if there is no active transaction.@Nullable String
Returns the Scope's transaction name.@Nullable User
getUser()
Returns the Scope's uservoid
removeContexts
(@NotNull String key) Removes a value from the Scope's contextsvoid
removeExtra
(@NotNull String key) Removes an extra from the Scope's extrasvoid
Removes a tag from the Scope's tagsvoid
replaceOptions
(@NotNull SentryOptions options) void
setActiveSpan
(@Nullable ISpan span) void
setContexts
(@NotNull String key, @NotNull Boolean value) Sets the Scope's contextsvoid
setContexts
(@NotNull String key, @NotNull Character value) Sets the Scope's contextsvoid
setContexts
(@NotNull String key, @NotNull Number value) Sets the Scope's contextsvoid
setContexts
(@NotNull String key, @NotNull Object value) Sets the Scope's contextsvoid
setContexts
(@NotNull String key, @NotNull Object[] value) Sets the Scope's contextsvoid
setContexts
(@NotNull String key, @NotNull String value) Sets the Scope's contextsvoid
setContexts
(@NotNull String key, @NotNull Collection<?> value) Sets the Scope's contextsvoid
Sets an extra to the Scope's extra mapvoid
setFingerprint
(@NotNull List<String> fingerprint) Sets the Scope's fingerprint listvoid
setLastEventId
(@NotNull SentryId lastEventId) void
setLevel
(@Nullable SentryLevel level) Sets the Scope's SentryLevel Level from scope exceptionally take precedence over the eventvoid
setPropagationContext
(@NotNull PropagationContext propagationContext) void
setReplayId
(@Nullable SentryId replayId) Sets the Scope's current replay_idvoid
setRequest
(@Nullable Request request) Sets the Scope's requestvoid
Sets the Scope's current screenvoid
setSpanContext
(@NotNull Throwable throwable, @NotNull ISpan span, @NotNull String transactionName) void
Sets a tag to Scope's tagsvoid
setTransaction
(@NotNull String transaction) Sets the Scope's transaction.void
setTransaction
(@Nullable ITransaction transaction) Sets the current active transactionvoid
Sets the Scope's userio.sentry.Scope.SessionPair
Returns a previous session (now closed) bound to this scope together with the newly created one@NotNull PropagationContext
withPropagationContext
(@NotNull Scope.IWithPropagationContext callback) @Nullable Session
withSession
(@NotNull io.sentry.Scope.IWithSession sessionCallback) Callback to do atomic operations on sessionvoid
withTransaction
(@NotNull Scope.IWithTransaction callback) Mutates the current transaction atomically
-
Method Details
-
getInstance
-
getLevel
-
setLevel
Description copied from interface:IScope
Sets the Scope's SentryLevel Level from scope exceptionally take precedence over the event -
getTransactionName
Description copied from interface:IScope
Returns the Scope's transaction name.- Specified by:
getTransactionName
in interfaceIScope
- Returns:
- the transaction
-
setTransaction
Description copied from interface:IScope
Sets the Scope's transaction.- Specified by:
setTransaction
in interfaceIScope
- Parameters:
transaction
- the transaction
-
getSpan
Description copied from interface:IScope
Returns current active Span or Transaction. -
setActiveSpan
- Specified by:
setActiveSpan
in interfaceIScope
-
setTransaction
Description copied from interface:IScope
Sets the current active transaction- Specified by:
setTransaction
in interfaceIScope
- Parameters:
transaction
- the transaction
-
getUser
Description copied from interface:IScope
Returns the Scope's user -
setUser
Description copied from interface:IScope
Sets the Scope's user -
getScreen
Description copied from interface:IScope
Returns the Scope's current screen, previously set byIScope.setScreen(String)
-
setScreen
Description copied from interface:IScope
Sets the Scope's current screen -
getReplayId
Description copied from interface:IScope
Returns the Scope's current replay_id, previously set byIScope.setReplayId(SentryId)
- Specified by:
getReplayId
in interfaceIScope
- Returns:
- the id of the current session replay
-
setReplayId
Description copied from interface:IScope
Sets the Scope's current replay_id- Specified by:
setReplayId
in interfaceIScope
- Parameters:
replayId
- the id of the current session replay
-
getRequest
Description copied from interface:IScope
Returns the Scope's request- Specified by:
getRequest
in interfaceIScope
- Returns:
- the request
-
setRequest
Description copied from interface:IScope
Sets the Scope's request- Specified by:
setRequest
in interfaceIScope
- Parameters:
request
- the request
-
getFingerprint
Description copied from interface:IScope
Returns the Scope's fingerprint list- Specified by:
getFingerprint
in interfaceIScope
- Returns:
- the fingerprint list
-
setFingerprint
Description copied from interface:IScope
Sets the Scope's fingerprint list- Specified by:
setFingerprint
in interfaceIScope
- Parameters:
fingerprint
- the fingerprint list
-
getBreadcrumbs
Description copied from interface:IScope
Returns the Scope's breadcrumbs queue- Specified by:
getBreadcrumbs
in interfaceIScope
- Returns:
- the breadcrumbs queue
-
addBreadcrumb
Description copied from interface:IScope
Adds a breadcrumb to the breadcrumbs queue. It also executes the BeforeBreadcrumb callback if set- Specified by:
addBreadcrumb
in interfaceIScope
- Parameters:
breadcrumb
- the breadcrumbhint
- the hint
-
addBreadcrumb
Description copied from interface:IScope
Adds a breadcrumb to the breadcrumbs queue It also executes the BeforeBreadcrumb callback if set- Specified by:
addBreadcrumb
in interfaceIScope
- Parameters:
breadcrumb
- the breadcrumb
-
clearBreadcrumbs
public void clearBreadcrumbs()Description copied from interface:IScope
Clear all the breadcrumbs- Specified by:
clearBreadcrumbs
in interfaceIScope
-
clearTransaction
public void clearTransaction()Description copied from interface:IScope
Clears the transaction.- Specified by:
clearTransaction
in interfaceIScope
-
getTransaction
Description copied from interface:IScope
Returns active transaction or null if there is no active transaction.- Specified by:
getTransaction
in interfaceIScope
- Returns:
- the transaction
-
clear
public void clear()Description copied from interface:IScope
Resets the Scope to its default state -
getTags
Description copied from interface:IScope
Returns the Scope's tags -
setTag
Description copied from interface:IScope
Sets a tag to Scope's tags -
removeTag
Description copied from interface:IScope
Removes a tag from the Scope's tags -
getExtras
Description copied from interface:IScope
Returns the Scope's extra map -
setExtra
Description copied from interface:IScope
Sets an extra to the Scope's extra map -
removeExtra
Description copied from interface:IScope
Removes an extra from the Scope's extras- Specified by:
removeExtra
in interfaceIScope
- Parameters:
key
- the key
-
getContexts
Description copied from interface:IScope
Returns the Scope's contexts- Specified by:
getContexts
in interfaceIScope
- Returns:
- the contexts
-
setContexts
Description copied from interface:IScope
Sets the Scope's contexts- Specified by:
setContexts
in interfaceIScope
- Parameters:
key
- the context keyvalue
- the context value
-
setContexts
Description copied from interface:IScope
Sets the Scope's contexts- Specified by:
setContexts
in interfaceIScope
- Parameters:
key
- the context keyvalue
- the context value
-
setContexts
Description copied from interface:IScope
Sets the Scope's contexts- Specified by:
setContexts
in interfaceIScope
- Parameters:
key
- the context keyvalue
- the context value
-
setContexts
Description copied from interface:IScope
Sets the Scope's contexts- Specified by:
setContexts
in interfaceIScope
- Parameters:
key
- the context keyvalue
- the context value
-
setContexts
Description copied from interface:IScope
Sets the Scope's contexts- Specified by:
setContexts
in interfaceIScope
- Parameters:
key
- the context keyvalue
- the context value
-
setContexts
Description copied from interface:IScope
Sets the Scope's contexts- Specified by:
setContexts
in interfaceIScope
- Parameters:
key
- the context keyvalue
- the context value
-
setContexts
Description copied from interface:IScope
Sets the Scope's contexts- Specified by:
setContexts
in interfaceIScope
- Parameters:
key
- the context keyvalue
- the context value
-
removeContexts
Description copied from interface:IScope
Removes a value from the Scope's contexts- Specified by:
removeContexts
in interfaceIScope
- Parameters:
key
- the Key
-
getAttachments
Description copied from interface:IScope
Returns the Scopes's attachments- Specified by:
getAttachments
in interfaceIScope
- Returns:
- the attachments
-
addAttachment
Description copied from interface:IScope
Adds an attachment to the Scope's list of attachments. The SDK adds the attachment to every event and transaction sent to Sentry.- Specified by:
addAttachment
in interfaceIScope
- Parameters:
attachment
- The attachment to add to the Scope's list of attachments.
-
clearAttachments
public void clearAttachments()Description copied from interface:IScope
Clear all attachments.- Specified by:
clearAttachments
in interfaceIScope
-
getEventProcessors
Description copied from interface:IScope
Returns the Scope's event processors- Specified by:
getEventProcessors
in interfaceIScope
- Returns:
- the event processors list
-
getEventProcessorsWithOrder
@Internal @NotNull public @NotNull List<io.sentry.internal.eventprocessor.EventProcessorAndOrder> getEventProcessorsWithOrder()- Specified by:
getEventProcessorsWithOrder
in interfaceIScope
-
addEventProcessor
Description copied from interface:IScope
Adds an event processor to the Scope's event processors list- Specified by:
addEventProcessor
in interfaceIScope
- Parameters:
eventProcessor
- the event processor
-
withSession
@Internal @Nullable public @Nullable Session withSession(@NotNull io.sentry.Scope.IWithSession sessionCallback) Description copied from interface:IScope
Callback to do atomic operations on session- Specified by:
withSession
in interfaceIScope
- Parameters:
sessionCallback
- the IWithSession callback- Returns:
- a clone of the Session after executing the callback and mutating the session
-
startSession
@Internal @Nullable public io.sentry.Scope.SessionPair startSession()Description copied from interface:IScope
Returns a previous session (now closed) bound to this scope together with the newly created one- Specified by:
startSession
in interfaceIScope
- Returns:
- the SessionPair with the previous closed session if exists and the current session
-
endSession
Description copied from interface:IScope
Ends a session, unbinds it from the scope and returns it.- Specified by:
endSession
in interfaceIScope
- Returns:
- the previous session
-
withTransaction
Description copied from interface:IScope
Mutates the current transaction atomically- Specified by:
withTransaction
in interfaceIScope
- Parameters:
callback
- the IWithTransaction callback
-
getOptions
- Specified by:
getOptions
in interfaceIScope
-
getSession
- Specified by:
getSession
in interfaceIScope
-
clearSession
@Internal public void clearSession()- Specified by:
clearSession
in interfaceIScope
-
setPropagationContext
@Internal public void setPropagationContext(@NotNull @NotNull PropagationContext propagationContext) - Specified by:
setPropagationContext
in interfaceIScope
-
getPropagationContext
- Specified by:
getPropagationContext
in interfaceIScope
-
withPropagationContext
@Internal @NotNull public @NotNull PropagationContext withPropagationContext(@NotNull Scope.IWithPropagationContext callback) - Specified by:
withPropagationContext
in interfaceIScope
-
setLastEventId
- Specified by:
setLastEventId
in interfaceIScope
-
clone
Clones the Scope -
getLastEventId
- Specified by:
getLastEventId
in interfaceIScope
-
bindClient
- Specified by:
bindClient
in interfaceIScope
-
getClient
-
assignTraceContext
- Specified by:
assignTraceContext
in interfaceIScope
-
setSpanContext
public void setSpanContext(@NotNull @NotNull Throwable throwable, @NotNull @NotNull ISpan span, @NotNull @NotNull String transactionName) - Specified by:
setSpanContext
in interfaceIScope
-
replaceOptions
- Specified by:
replaceOptions
in interfaceIScope
-