Skip to main content

Overview

This guide shows you how to integrate Latitude Telemetry into an application that uses the OpenAI SDK.
You’ll keep calling OpenAI exactly as you do today. Telemetry simply observes and enriches those calls.
Using the OpenAI Agents SDK (@openai/agents)? See OpenAI Agents SDK — agent runs use the Responses API and need a dedicated instrumentation.

Requirements

  • A Latitude account and API key
  • A Latitude project slug
  • A project that uses the OpenAI SDK

Steps

1

Install

2

Initialize and use


Streaming

When streaming, consume the stream inside capture() so the span covers the full operation:

Seeing Your Traces

Once connected, traces appear automatically in Latitude:
  1. Open your project in the Latitude dashboard
  2. Each execution shows input/output messages, model, token usage, latency, and errors