Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide provides instructions for integrating LangWatch with the TrueFoundry AI Gateway to export OpenTelemetry traces.

What is LangWatch?

LangWatch is an LLM observability and evaluation platform that accepts traces via standard OpenTelemetry Protocol (OTLP) endpoints. It captures LLM call traces, evaluates them against custom criteria, and provides analytics, annotation tools, and dataset management for AI applications. LangWatch is compatible with any OpenTelemetry-instrumented source and maps received spans to its own data model automatically.

Key Features of LangWatch

  • OpenTelemetry Ingestion: Accepts OTLP traces over HTTP and gRPC, compatible with all OpenTelemetry SDKs and exporters including the TrueFoundry AI Gateway.
  • Evaluations: Run automated evaluations on captured traces to measure quality, safety, and correctness of LLM responses.
  • Annotations and Datasets: Annotate traces manually or programmatically and build datasets for fine-tuning and regression testing.
  • Analytics: Visualize trace volume, latency, token usage, and cost trends across models and time periods.

Prerequisites

Before integrating LangWatch with TrueFoundry, ensure you have:
  1. TrueFoundry Account: Create a TrueFoundry account and follow the instructions in our Gateway Quick Start Guide.
  2. LangWatch Account: Sign up at app.langwatch.ai. A free tier is available.
  3. LangWatch API Key: Create an API key from the LangWatch dashboard under Settings → API Keys.

Integration Steps

1

Get Your LangWatch API Key

  1. Log in to app.langwatch.ai.
  2. In the left sidebar go to Settings.
  3. Navigate to API Keys and click Create API Key.
  4. Give it a name (for example tfy-gateway) and copy the key.
LangWatch Settings page showing API Keys section with a key created for TrueFoundry
LangWatch API keys are project-scoped. Make sure you are in the correct project before creating the key, as traces will be routed to that project.
2

Configure OTEL Export in TrueFoundry

  1. Go to AI GatewayControlsSettings in the TrueFoundry dashboard.
  2. Scroll down to the OTEL Config section and click the edit (✏️) button.
TrueFoundry AI Gateway Settings page showing the OTEL Config section
  1. Enable the Otel Traces Exporter Configuration toggle and fill in:
FieldValue
ToggleEnabled
ProtocolHTTP Configuration
Endpointhttps://app.langwatch.ai/api/otel/v1/traces
EncodingProto
Header KeyAuthorization
Header ValueBearer <your-langwatch-api-key>
TrueFoundry OTEL Traces Exporter Configuration showing LangWatch endpoint and Authorization header
  1. Click Save to apply the configuration.
LangWatch does not currently support OTLP metrics ingestion — only configure the Traces Exporter. Leave the Otel Metrics Exporter Configuration disabled.
3

Verify the Integration

  1. Make a request through the TrueFoundry AI Gateway (for example from the Playground).
  2. Log into app.langwatch.ai and click Traces in the left sidebar.
  3. Confirm traces from tfy-llm-gateway are appearing with timestamps matching your test request.
LangWatch Traces page showing LLM call traces from TrueFoundry AI Gateway
Traces may show &lt;empty&gt; in the Input and Output columns initially. This is because LangWatch requires specific gen_ai.* span attributes to populate these fields. The traces are ingested correctly — click on any trace to view the full span attributes including tfy.input and tfy.output.

Configuration Reference

ConfigurationValue
Traces Endpointhttps://app.langwatch.ai/api/otel/v1/traces
Metrics EndpointNot supported
ProtocolHTTP
EncodingProto
Auth Header KeyAuthorization
Auth Header ValueBearer <your-langwatch-api-key>