Send HTTP JSON directly
exporter to instrument(agent, { exporters: [exporter] }) or instrumentBus. endpoint is a base URL and appends /v1/traces. Use tracesEndpoint when you already have the complete signal URL. Supply collector authentication in headers.
OTelExporter implements HTTP JSON. It rejects http/protobuf; use a host SDK exporter through the bridge when your collector requires binary OTLP.
Use your host SDK
This complete factory borrows your tracer and an explicit context binding. Your host initializes its SDK, sampling, span processors, and exporter before calling it.tracer or provider, plus contextFor(parent). In an OpenTelemetry host, the latter can use trace.setSpanContext(context.active(), parent) with your chosen root-context behavior when no parent exists. Follow your host SDK’s context propagation rules.
The bridge emits completed spans into that tracer and keeps source span IDs as correlation attributes. It never registers a global provider and never shuts down the provider you supplied. Drain Agentium observation first, then flush/shut down your host SDK according to the application’s lifecycle.
The same capture policy and bounds apply to both paths.