LibraryTelemetry
class LibraryTelemetry @JvmOverloads constructor(openTelemetry: OpenTelemetry = OpenTelemetry.noop(), emitSpans: Boolean = true) : TelemetrySink
Bridges library events onto the host's OpenTelemetry and Prometheus surfaces.
org.trustweave.core.telemetry.Telemetry is deliberately dependency-free so the core modules do not acquire OpenTelemetry; this is the adapter that gives those events somewhere to go. Install it once, alongside HostObservability:
val library = LibraryTelemetry(openTelemetry)
Telemetry.install(library)
// library.prometheus() is appended to the host scrape by HostObservabilityContent copied to clipboard
Each event becomes a short span carrying the correlation id the host put in the coroutine context, so a library operation joins the request that caused it, plus counters and a duration histogram per operation. Attributes arrive already bounded and secret-free from the library side; nothing here adds an identifier of its own.
Constructors
Link copied to clipboard