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.
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.
Details
at line 50
bool
isApplicable()
Indicate if the feature is applicable to the current environment.
in
Feature at line 47
void
register()
Register the feature in the environment.
at line 56
void
onBoot()
Set up the feature in the environment.
in
Feature at line 63
void
onBootInactive()
Set up the feature in the environment in an inactive state (when no DSN was set).
in
Feature at line 70
void
boot()
Initialize the feature.
in
Feature at line 80
void
bootInactive()
Initialize the feature in an inactive state (when no DSN was set).
in
Feature at line 90
protected array
getUserConfig()
Retrieve the user configuration.
in
Feature at line 98
protected bool
shouldSendDefaultPii()
Determine if default PII should be sent.
in
Feature at line 112
protected bool
isTracingFeatureEnabled(string $feature, bool $default = true)
Indicate if the given feature is enabled for tracing.
in
Feature at line 125
protected bool
isBreadcrumbFeatureEnabled(string $feature, bool $default = true)
Indicate if the given feature is enabled for breadcrumbs.
in
Feature at line 148
protected bool
canRecordSpans()
Determine if the active SDK client can record spans.
in
Feature at line 162
protected bool
canRecordBreadcrumbs()
Determine if the active SDK client can record 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 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.
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 90
void
handleCacheEventsForBreadcrumbs(CacheEvent $event)
No description
at line 123
void
handleCacheEventsForTracing(CacheEvent $event)
No description
at line 186
protected bool
maybeHandleCacheEventAsEndOfSpan(CacheEvent $event)
No description