NotificationsIntegration
class NotificationsIntegration extends Feature
Traits
Track pushed scopes and spans using coroutine-local storage.
Constants
| private FEATURE_KEY |
|
| private SPAN_OWNERS_CONTEXT_KEY |
|
Methods
Indicate if the feature is applicable to the current environment.
Set up the feature in the environment.
Set up the feature in the environment in an inactive state (when no DSN was set).
Indicate if the given feature is enabled for tracing.
Indicate if the given feature is enabled for breadcrumbs.
Push a span onto the coroutine-local stack and set it as current on the hub.
Push a scope onto the hub and track the count in coroutine-local storage.
Track an operation-local span without making it current on the Hub.
Pop a span from the coroutine-local stack and restore the parent span.
Pop a scope from the hub if one was pushed in this coroutine.
Finish the current span if one exists on the coroutine-local stack.
Finish an operation-local span by key if one exists.
Finish the span of a delivered, failed or skipped notification.
Details
at line 32
bool
isApplicable()
Indicate if the feature is applicable to the current environment.
in
Feature at line 48
void
register()
Register the feature in the environment.
at line 41
void
onBoot()
Set up the feature in the environment.
in
Feature at line 64
void
onBootInactive()
Set up the feature in the environment in an inactive state (when no DSN was set).
in
Feature at line 71
void
boot()
Initialize the feature.
in
Feature at line 81
void
bootInactive()
Initialize the feature in an inactive state (when no DSN was set).
in
Feature at line 91
protected array
getUserConfig()
Retrieve the user configuration.
in
Feature at line 99
protected bool
shouldSendDefaultPii()
Determine if default PII should be sent.
in
Feature at line 113
protected bool
shouldCollectGenAiInputs()
Determine whether AI inputs may be collected.
in
Feature at line 121
protected bool
shouldCollectGenAiOutputs()
Determine whether AI outputs may be collected.
in
Feature at line 146
protected bool
isTracingFeatureEnabled(string $feature, bool $default = true)
Indicate if the given feature is enabled for tracing.
in
Feature at line 159
protected bool
isBreadcrumbFeatureEnabled(string $feature, bool $default = true)
Indicate if the given feature is enabled for breadcrumbs.
in
Feature at line 182
protected bool
canRecordSpans()
Determine if the active SDK client can record spans.
in
Feature at line 196
protected bool
canRecordBreadcrumbs()
Determine if the active SDK client can record breadcrumbs.
in
TracksPushedScopesAndSpans at line 26
protected void
pushSpan(Span $span)
Push a span onto the coroutine-local stack and set it as current on the hub.
in
TracksPushedScopesAndSpans at line 45
protected Scope
pushScope()
Push a scope onto the hub and track the count in coroutine-local storage.
in
TracksPushedScopesAndSpans at line 59
protected void
trackLocalSpan(string $key, Span $span)
Track an operation-local span without making it current on the Hub.
in
TracksPushedScopesAndSpans at line 70
protected Span|null
maybePopSpan()
Pop a span from the coroutine-local stack and restore the parent span.
in
TracksPushedScopesAndSpans at line 93
protected void
maybePopScope()
Pop a scope from the hub if one was pushed in this coroutine.
in
TracksPushedScopesAndSpans at line 109
protected Span|null
maybeFinishSpan(SpanStatus|null $status = null)
Finish the current span if one exists on the coroutine-local stack.
in
TracksPushedScopesAndSpans at line 129
protected Span|null
maybeFinishLocalSpan(string $key, SpanStatus|null $status = null)
Finish an operation-local span by key if one exists.
at line 61
void
handleNotificationSending(NotificationSending $event)
Start a span for the notification being sent.
at line 91
void
handleNotificationSent(NotificationSent $event)
Record a breadcrumb for the sent notification.
at line 111
void
handleNotificationTerminal(NotificationDelivered|NotificationFailed|NotificationSkipped $event)
Finish the span of a delivered, failed or skipped notification.