Skip to main content

InstrumentationScope

InstrumentationScope records which library or component produced a signal. It's what lets a backend tell spans from your own code apart from spans emitted by a dependency, and group or filter by either.

final case class InstrumentationScope(
name: String,
version: Option[String] = None,
attributes: Attributes = Attributes.empty
)

You rarely name the type: it's built for you from the name you pass to TracerProvider#get, LoggerProvider#get, or MeterProvider#get, and every Span, SpanData, LogRecord, Tracer, and Meter then carries it.