addWeaveExporter

fun OpenTelemetryConfig.addWeaveExporter(weaveOtelBaseUrl: String? = null, weaveEntity: String? = null, weaveProjectName: String? = null, weaveApiKey: String? = null, timeout: Duration? = null)(source)

Configures a span exporter that sends data to W&B Weave and installs the Weave SpanAdapter that reshapes spans to the Weave-recommended attribute layout.

Uses the Kotlin Multiplatform OTLP/JSON exporter - works on every target supported by the OpenTelemetry feature. Authenticates via HTTP Basic with the W&B API key.

Registered via addSpanExporter, which wraps the exporter in a batch span processor - the cloud HTTP round-trip happens on a worker thread instead of blocking the agent on each span end.

For test or non-cloud setups that need only the span transformations, see addWeaveSpanAdapter.

Parameters

weaveOtelBaseUrl

base Weave URL;

weaveEntity

W&B Weave entity (org/team);

weaveProjectName

W&B Weave project name;

weaveApiKey

W&B API key;

timeout

request timeout (10 seconds by default).