addLangfuseExporter
Configures a span exporter that sends data to Langfuse and installs the Langfuse SpanAdapter that reshapes spans to the Langfuse-recommended attribute layout.
Uses the Kotlin Multiplatform OTLP/JSON exporter - works on every target supported by the OpenTelemetry feature. Authenticates via HTTP Basic with LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY (passed in or read from environment variables).
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 addLangfuseSpanAdapter.
Parameters
base Langfuse URL;
Langfuse public key. Defaults to LANGFUSE_PUBLIC_KEY env var;
Langfuse secret key. Defaults to LANGFUSE_SECRET_KEY env var;
request timeout (10 seconds by default);
list of trace-level Langfuse attributes (see https://langfuse.com/integrations/native/opentelemetry#propagating-attributes).