CacheFeature
class CacheFeature extends Feature
Traits
Track pushed scopes and spans using coroutine-local storage.
Constants
| private FEATURE_KEY |
|
Properties
| bool internal | $detectSessionKeyOnConsole | Indicates whether to attempt to detect the session key when running in the console. |
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.
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.
Details
at line 48
bool
isApplicable()
Indicate if the feature is applicable to the current environment.
in
Feature at line 46
void
register()
Register the feature in the environment.
at line 54
void
onBoot()
Set up the feature in the environment.
in
Feature at line 62
void
onBootInactive()
Set up the feature in the environment in an inactive state (when no DSN was set).
in
Feature at line 69
void
boot()
Initialize the feature.
in
Feature at line 83
void
bootInactive()
Initialize the feature in an inactive state (when no DSN was set).
in
Feature at line 97
protected array
getUserConfig()
Retrieve the user configuration.
in
Feature at line 105
protected bool
shouldSendDefaultPii()
Determine if default PII should be sent.
in
Feature at line 119
protected bool
isTracingFeatureEnabled(string $feature, bool $default = true)
Indicate if the given feature is enabled for tracing.
in
Feature at line 131
protected bool
isBreadcrumbFeatureEnabled(string $feature, bool $default = true)
Indicate if the given feature is enabled for breadcrumbs.
in
WorksWithSpans at line 12
protected Span|null
getParentSpanIfSampled()
No description
in
WorksWithSpans at line 25
protected void
withParentSpanIfSampled(callable $callback)
No description
in
TracksPushedScopesAndSpans at line 24
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 42
protected void
pushScope()
Push a scope onto the hub and track the count in coroutine-local storage.
in
TracksPushedScopesAndSpans at line 53
protected Span|null
maybePopSpan()
Pop a span from the coroutine-local stack and restore the parent span.
in
TracksPushedScopesAndSpans at line 76
protected void
maybePopScope()
Pop a scope from the hub if one was pushed in this coroutine.
in
TracksPushedScopesAndSpans at line 94
protected Span|null
maybeFinishSpan(SpanStatus|null $status = null)
Finish the current span if one exists on the coroutine-local stack.
in
ResolvesEventOrigin at line 15
protected Container
container()
Retrieve the application container.
in
ResolvesEventOrigin at line 20
protected array|null
resolveEventOrigin()
No description
in
ResolvesEventOrigin at line 44
protected string|null
resolveEventOriginAsString()
No description
at line 91
void
handleCacheEventsForBreadcrumbs(CacheEvent $event)
No description
at line 124
void
handleCacheEventsForTracing(CacheEvent $event)
No description
at line 194
protected bool
maybeHandleCacheEventAsEndOfSpan(CacheEvent $event)
No description