Documentation Index
Fetch the complete documentation index at: https://docs.latitude.so/llms.txt
Use this file to discover all available pages before exploring further.
Connect with Any OpenTelemetry Exporter
Latitude’s ingestion endpoint speaks standard OTLP over HTTP. If your language has an OpenTelemetry SDK (Go, Java, Ruby, Rust, .NET, Elixir, PHP, etc.), you can send traces to Latitude without a Latitude-specific library.Using TypeScript or Python? The dedicated SDKs handle all of this for you with a single function call. See the TypeScript SDK or Python SDK instead.
Prerequisites
- A Latitude API key — generate one from your project settings in the Latitude dashboard.
- Your project slug — visible in the project settings or URL.
Endpoint and Headers
| Value | |
|---|---|
| URL | https://ingest.latitude.so/v1/traces |
| Method | POST |
Authorization | Bearer <your-api-key> |
X-Latitude-Project | <your-project-slug> |
Content-Type | application/json or application/x-protobuf |
ExportTraceServiceRequest body and returns 202 on success.
Verify with curl
A minimal request to confirm connectivity (replace the placeholders):202 response with {} means the endpoint accepted your payload.
Language Examples
Every OpenTelemetry SDK lets you configure an OTLP HTTP exporter with a custom endpoint and headers. Below are the key configuration snippets — the rest of your OTel setup (tracer provider, instrumentations, etc.) stays the same as usual.Go
Java
Ruby
.NET
Environment Variables (Any Language)
Most OpenTelemetry SDKs respect standard environment variables, so you can often skip code changes entirely:Latitude Span Attributes
All spans reaching the endpoint are ingested. To get the most out of the Latitude UI (filtering by user, session, tags), set these optional span attributes:| Attribute | Type | Description |
|---|---|---|
latitude.capture.name | string | A name for the capture context (e.g. "handle-user-request") |
latitude.tags | string (JSON array) | Tags for filtering, e.g. '["production","v2"]' |
latitude.metadata | string (JSON object) | Arbitrary key-value pairs, e.g. '{"requestId":"abc"}' |
session.id | string | Group related traces into a session |
user.id | string | Associate traces with a specific user |
Existing Observability Stack
Latitude works alongside your existing observability tools. AddLatitudeSpanProcessor as an additional span processor so traces go to both Latitude and your current backend.
With Datadog (TypeScript)
With Sentry (TypeScript)
Other Platforms
For any observability platform that supports OpenTelemetry (Jaeger, Grafana Tempo, Honeycomb, etc.), the pattern is the same: configure an additional OTLP exporter pointed athttps://ingest.latitude.so/v1/traces with the required Authorization and X-Latitude-Project headers alongside your existing exporter.
Troubleshooting
401 Unauthorized
TheAuthorization header must use the Bearer prefix (with a space). Double-check your API key is valid and not expired.
400 Bad Request — missing project header
TheX-Latitude-Project header is required on every request. Ensure it is present and spelled correctly, and that the value matches a project slug in the organization associated with your API key.
202 but no traces visible
- Empty body: An empty request body is accepted with
202but produces no traces. Ensure your exporter is actually attaching span data. - Smart filter (SDK only): If you are using a Latitude SDK’s
LatitudeSpanProcessor, only LLM-relevant spans are exported by default. This does not apply when sending OTLP directly — all spans are ingested. - Flush before exit: Make sure your tracer provider flushes pending spans before the process exits.
Encoding
The endpoint accepts bothapplication/json (JSON-encoded OTLP) and application/x-protobuf (protobuf-encoded OTLP). Most OTel SDK exporters default to protobuf; both work.