This guide explains how to integrate Galileo with OpenTelemetry and OpenInference for comprehensive observability and tracing of your AI/ML workflows using industry-standard tools.Documentation Index
Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
Use this file to discover all available pages before exploring further.
OpenTelemetry
The first step is to configure OpenTelemetry.Installation
Add the Galileo SDK and OpenTelemetry packages to your project:For Python, the
opentelemetry-api and opentelemetry-sdk packages provide the core OpenTelemetry functionality. The opentelemetry-exporter-otlp package enables sending traces to Galileo’s OTLP endpoint.For TypeScript, the galileo package includes the GalileoSpanProcessor which handles OTLP export configuration automatically. The @opentelemetry/sdk-trace-node and @opentelemetry/exporter-trace-otlp-proto packages are required peer dependencies.Create environment variables for your Galileo settings
Set environment variables for your Galileo settings, for example in a
.env file.
These environment variables are consumed by the GalileoSpanProcessor to authenticate
and route traces to the correct Galileo Project and Log stream:Self-hosted deployments: Set the OTel endpoint
Skip this step if you are using Galileo Cloud.
-
Galileo Cloud at app.galileo.ai, then you don’t need to provide a custom OTel endpoint.
The default endpoint
https://api.galileo.ai/otel/traceswill be used automatically. -
A self-hosted Galileo deployment, replace the
https://api.galileo.ai/otel/tracesendpoint with your deployment URL. The format of this URL is based on your console URL, replacingconsolewithapiand appending/otel/traces.
- if your console URL is
https://console.galileo.example.com, the OTel endpoint would behttps://api.galileo.example.com/otel/traces - if your console URL is
https://console-galileo.apps.mycompany.com, the OTel endpoint would behttps://api-galileo.apps.mycompany.com/otel/traces
GALILEO_CONSOLE_URL environment variable. For example:Initialize and create the Galileo span processor
The
GalileoSpanProcessor automatically configures authentication
and metadata using your environment variables. It also:- Auto-builds OTLP headers using your Galileo credentials
- Configures the correct OTLP trace endpoint
- Registers a batch span processor that exports traces to Galileo
OpenInference
OpenInference instrumentors are currently available for Python only. For TypeScript/Node.js applications, use framework-specific OTel integrations such as Vercel AI SDK or Mastra.
- Automatic capture of LLM calls, token usage, and model performance metrics
- AI-specific span attributes like
gen_ai.request.model,gen_ai.response.content, andgen_ai.usage.* - Semantic conventions that make your traces more meaningful in Galileo’s dashboard
- Framework-specific instrumentation for LangGraph workflows and OpenAI API calls
Next steps
Learn how to integrate with some popular frameworks using OpenTelemetry and OpenInference.Google ADK
Learn how to integrate a Google ADK project with Galileo using OpenTelemetry and OpenInference.
Strands Agents
Learn how to integrate a Strands Agents project with Galileo using OpenTelemetry.
Vercel AI SDK
Learn how to integrate a Vercel AI SDK project with Galileo using OpenTelemetry.
Mastra
Learn how to integrate a Mastra project with Galileo using OpenTelemetry.