OtlpJsonSpanExporter
Kotlin Multiplatform OTLP/JSON SpanExporter implementation.
Sends spans over HTTP to any OTLP/JSON-compatible receiver (Langfuse, W&B Weave, generic collectors). The wire format follows https://opentelemetry.io/docs/specs/otlp/#json-protobuf-encoding with Content-Type: application/json and the JSON-encoded ExportTraceServiceRequest.
On non-2xx responses or transport errors, returns OperationResultCode.Failure; the configured span processor (typically BatchSpanProcessor) drops the failed batch.
Note: There is no built-in retry / back-off.
Parameters
full OTLP/JSON URL, e.g. https://cloud.langfuse.com/api/public/otel/v1/traces.
extra HTTP headers (typically Authorization);
request timeout, by default, set to 10 seconds;
optional HttpClient. When provided, the exporter uses it as-is and skips the default ContentNegotiation install - the caller must provide a JSON serializer.