Docs navigation

OpenTelemetry integration

Already tracing your agents with OpenTelemetry? Point an OTLP/JSON exporter at ProofLedger and your existing traces flow into the trust layer: gen_ai.* spans become model executions (provenance, cost, model-level policies) and tool spans become hash-chained audit events.

How it fits

OpenTelemetry is an interoperability layer, not a replacement for the signed ledger. Ingested spans go through the same pipeline as SDK events — tool resolution, policy evaluation, security events, and the per-agent hash chain — so ordinary tracing data becomes verifiable trust data. ProofLedger's differentiation (identity, signatures, tamper evidence, policy, trust, outcome verification) applies on top.

Note

OTel spans are unsigned by definition, so they never move the trust score for missing signatures. For signed events and outcome recording, use the SDK alongside your exporter.

Point an exporter at ProofLedger

tracing.ts
// Any OTLP/HTTP JSON exporter works — no ProofLedger SDK required.
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";

const exporter = new OTLPTraceExporter({
  url: "https://www.proofledger.dev/api/otel/traces",
  headers: { authorization: `Bearer ${process.env.PROOFLEDGER_API_KEY}` },
});

Attributes we understand

attributes.ts
// Identity: set on the span or the resource (service.name also works)
span.setAttribute("proofledger.agent.id", "procurement-agent-01");

// Model spans use the standard GenAI semantic conventions:
//   gen_ai.system              → provider        (anthropic, openai, ...)
//   gen_ai.request.model       → requested model
//   gen_ai.response.model      → executed model  (preferred when present)
//   gen_ai.usage.input_tokens  → input tokens
//   gen_ai.usage.output_tokens → output tokens
//   cloud.region               → hosting region  (model-level policies)

// Tool spans:
//   gen_ai.tool.name (or tool.name) → verified-tools registry + audit chain

Spans that match neither convention are counted and skipped. Requests are capped at 200 processed spans and share the project event rate limit.