Skip to content

OpenTelemetry (OTLP)

Lookspan exposes a native OTLP/HTTP receiver at POST /v1/traces. If your stack already emits OpenTelemetry traces, point the exporter at Lookspan and you get spans with no Lookspan SDK at all.

Configure your exporter

Set the standard OTel environment variable to Lookspan’s receiver:

Terminal window
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:3100/v1/traces
# protobuf (the OTel default) and JSON are both accepted

Any OTel SDK or the OpenTelemetry Collector can ship to this endpoint.

Semantic conventions

Lookspan maps the OpenTelemetry GenAI semantic conventions onto its span model, so model/provider/token fields populate automatically:

OTel attributeMaps to
gen_ai.systemprovider
gen_ai.request.modelmodel
gen_ai.response.modelmodel (response)
gen_ai.usage.input_tokensinput tokens
gen_ai.usage.output_tokensoutput tokens

From the token counts and the model name, Lookspan computes cost_usd server-side using its pricing table — the same way it does for the native SDKs.

When to use this

  • You already instrument with OpenTelemetry and don’t want a second SDK.
  • You run an OpenTelemetry Collector and want Lookspan as one more exporter target.
  • You’re on a language Lookspan doesn’t ship a native adapter for, but it has an OTel SDK.

If you control the agent code and want richer prompt/response capture (for Replay and judging), prefer the native drop-in SDKs instead.