Builder

org.typelevel.otel4s.sdk.trace.SdkTracerProvider.Builder
sealed trait Builder[F[_]]

Builder for TracerProvider.

Attributes

Source
SdkTracerProvider.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Merges the given TelemetryResource with the current one.

Merges the given TelemetryResource with the current one.

Value parameters

resource

the TelemetryResource to merge the current one with

Attributes

See also
Note

if both resources have different non-empty schemaUrl, the merge will fail.

Source
SdkTracerProvider.scala
def addSpanProcessor(processor: SpanProcessor[F]): Builder[F]

Adds a SpanProcessor to the span processing pipeline that will be built.

Adds a SpanProcessor to the span processing pipeline that will be built.

The span processor will be called each time a Span is started or ended.

Value parameters

processor

the span processor to add

Attributes

Note

the span processor must be thread-safe and return immediately (no remote calls, as contention free as possible).

Source
SdkTracerProvider.scala

Adds TextMapPropagators to use for the context propagation.

Adds TextMapPropagators to use for the context propagation.

Value parameters

propagators

the propagators to add

Attributes

Source
SdkTracerProvider.scala
def build: F[TracerProvider[F]]

Creates a new TracerProvider with the configuration of this builder.

Creates a new TracerProvider with the configuration of this builder.

Attributes

Source
SdkTracerProvider.scala
def withIdGenerator(idGenerator: IdGenerator[F]): Builder[F]

Sets an IdGenerator.

Sets an IdGenerator.

IdGenerator will be used each time a Span is started.

Value parameters

idGenerator

the IdGenerator to use

Attributes

Note

the id generator must be thread-safe and return immediately (no remote calls, as contention free as possible).

Source
SdkTracerProvider.scala

Sets a TelemetryResource to be attached to all spans created by Tracer.

Sets a TelemetryResource to be attached to all spans created by Tracer.

Value parameters

resource

the TelemetryResource to use

Attributes

Note

on multiple subsequent calls, the resource from the last call will be retained.

Source
SdkTracerProvider.scala
def withSampler(sampler: Sampler): Builder[F]

Sets a Sampler.

Sets a Sampler.

The sampler will be called each time a Span is started.

Value parameters

sampler

the Sampler to use

Attributes

Note

the sampler must be thread-safe and return immediately (no remote calls, as contention free as possible).

Source
SdkTracerProvider.scala