Sampler

zio.blocks.telemetry.Sampler
trait Sampler

A sampler decides whether a span should be recorded and/or sampled.

Samplers are invoked during span creation to determine the sampling decision for the new span.

Attributes

Source
Sampler.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def description: String

Returns a human-readable description of this sampler.

Returns a human-readable description of this sampler.

Attributes

Source
Sampler.scala
def shouldSample(parentContext: Option[SpanContext], traceIdHi: Long, traceIdLo: Long, name: String, kind: SpanKind, attributes: Attributes, links: Seq[SpanLink]): SamplingResult

Determines whether a span should be sampled.

Determines whether a span should be sampled.

Value parameters

attributes

the initial attributes of the span being created

kind

the kind of the span being created

links

the links associated with the span being created

name

the name of the span being created

parentContext

the parent span context, if any

traceIdHi

the high 64 bits of the trace ID

traceIdLo

the low 64 bits of the trace ID

Attributes

Returns

the sampling result

Source
Sampler.scala