TracingMode

org.llm4s.trace.TracingMode
See theTracingMode companion trait
object TracingMode

Defines built-in and named tracing modes and provides case-insensitive parsing of mode strings.

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case object Console extends TracingMode

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait TracingMode
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Console.type
final case class Named(name: String) extends TracingMode

A mode served by a org.llm4s.trace.spi.TracingBackend rather than by core.

A mode served by a org.llm4s.trace.spi.TracingBackend rather than by core.

This is what makes the set of modes open: a backend declares TracingMode.Named("datadog") and TRACING_MODE=datadog selects it, with no edit to core. Langfuse (Named("langfuse"), in llm4s-observability) and OpenTelemetry (Named("opentelemetry"), in llm4s-observability-otel) are registered exactly this way. Matching against a backend is case-insensitive.

Value parameters

name

the mode's config value; fromString produces it lower-cased

Attributes

Supertypes
trait TracingMode
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object NoOp extends TracingMode

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait TracingMode
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
NoOp.type

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fromString(mode: String): TracingMode

Parses a mode string into a TracingMode, case-insensitively.

Parses a mode string into a TracingMode, case-insensitively.

"console" and "print" give Console; "noop" and "none" give NoOp. "otel" is kept as an alias for Named("opentelemetry"). Any other non-blank value, "langfuse" and "opentelemetry" included, becomes Named, lower-cased, for a backend outside core to claim; whether one does is decided when the tracer is built, by Tracing.fromSettings. A blank value logs a warning and returns NoOp.

Value parameters

mode

mode string, typically the value of the TRACING_MODE environment variable

Attributes

Returns

the matching TracingMode