OpenTelemetry
Send traces to Retrace using the OpenTelemetry protocol (OTLP).
OpenTelemetry Ingestion
Retrace accepts traces via the OpenTelemetry Protocol (OTLP) over HTTP/JSON.
Endpoint
POST https://api.retrace.yashbogam.me/v1/tracesAuthentication
curl -X POST https://api.retrace.yashbogam.me/v1/traces \
-H "Authorization: Bearer rt_live_..." \
-H "Content-Type: application/json" \
-d '{"resourceSpans": [...]}'Supported Attributes
| OTel Attribute | Retrace Field |
|---|---|
gen_ai.system | span_type = llm_call |
gen_ai.request.model | model |
gen_ai.usage.input_tokens | input_tokens |
gen_ai.usage.output_tokens | output_tokens |
tool.name | span_type = tool_call |
Python Example
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
exporter = OTLPSpanExporter(
endpoint="https://api.retrace.yashbogam.me/v1/traces",
headers={"Authorization": "Bearer rt_live_..."},
)TypeScript Example
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
const exporter = new OTLPTraceExporter({
url: "https://api.retrace.yashbogam.me/v1/traces",
headers: { Authorization: "Bearer rt_live_..." },
});[!NOTE] OTel ingestion is available on all plans. Free tier limits still apply.