Sampler

org.typelevel.otel4s.sdk.trace.samplers.Sampler
See theSampler companion object
trait Sampler

A Sampler is used to make decisions on Span sampling.

Attributes

See also
Companion
object
Source
Sampler.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

The description of the Sampler.

The description of the Sampler. This may be displayed on debug pages or in the logs.

Attributes

Source
Sampler.scala
def shouldSample(parentContext: Option[SpanContext], traceId: ByteVector, name: String, spanKind: SpanKind, attributes: Attributes, parentLinks: Vector[LinkData]): SamplingResult

Called during span creation to make a sampling result.

Called during span creation to make a sampling result.

Value parameters

attributes

the Attributes associated with the new span

name

the name of the new span

parentContext

the parent's span context. None means there is no parent

parentLinks

the list of parent links associated with the span

spanKind

the SpanKind of the new span

traceId

the trace id of the new span

Attributes

Source
Sampler.scala

Concrete methods

final override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Sampler.scala