Spanport

OTLP ingest

OTLP/HTTP traces on the Spanport gateway. JSON and protobuf accepted; fan-out is JSON to destinations after decode.

Endpoints

EnvURL
Localhttp://127.0.0.1:4318/v1/traces
Hosted (planned)https://otlp.spanport.dev/v1/traces

Set OTEL_EXPORTER_OTLP_TRACES_ENDPOINT to the full traces path, or OTEL_EXPORTER_OTLP_ENDPOINT to the gateway root (SDK appends /v1/traces).

Content types

Swarm attributes

Prefer resource or span attributes (also accepted via baggage):

KeyUse
swarm.idOwning / calling swarm
agent.id / agent.roleAgent within the swarm
swarm.peer_idPeer swarm on cross-fleet calls
handoff.idCorrelate handoffs across trust boundaries

Propagate W3C traceparent, tracestate, and baggage on swarm↔swarm RPC — Spanport preserves them on fan-out but cannot invent a shared trace if the runtime drops headers.

OpenTelemetry Node (example)

import { NodeSDK } from "@opentelemetry/sdk-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";

const exporter = new OTLPTraceExporter({
  url: process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
  headers: {
    Authorization: `Bearer ${process.env.SPANPORT_API_KEY}`,
  },
});

const sdk = new NodeSDK({ traceExporter: exporter });
await sdk.start();