AlwaysOnExemplarFilter implements ExemplarFilter
Read onlyYes
FinalYes
Records an exemplar when span context is available.
This filter captures exemplars for all measurements that have an associated span context, regardless of whether the span is sampled. Use this when you want maximum observability and can afford the storage overhead.
Interfaces
- ExemplarFilter
- Determines whether an exemplar should be recorded for a metric measurement.
Methods
- __toString() : string
- shouldSample() : bool
- Determine whether to record an exemplar for this measurement.
Methods
__toString()
public
__toString() : string
Return values
stringshouldSample()
Determine whether to record an exemplar for this measurement.
public
shouldSample(SpanContext|null $context, int|float $value, array<string|int, mixed> $attributes) : bool
Parameters
- $context : SpanContext|null
-
The current span context, or null if none
- $value : int|float
-
The measurement value
- $attributes : array<string|int, mixed>
-
The measurement attributes