Learn how to add comprehensive observability to your LangGraph agents using OpenTelemetry and Galileo
Clone the repository
Install dependencies using uv
langgraph
for state graph workflowsopentelemetry-*
packages for instrumentationpython-dotenv
for environment variable managementCreate a free Galileo account
Get your API key
Create a project
.env
fileCreate your .env file
Edit your .env file with your actual values
.env
file - it contains your API keys!Configure OpenAI and Galileo authentication
Apply automatic instrumentation
Run the astronomy Q&A workflow
Export detailed traces
astronomy_qa_session
: The session-level span grouping all operationsvalidate_input
: The first node that validates user inputgenerate_response
: The OpenAI API call node with detailed LLM tracesformat_answer
: The response formatting and parsing nodeImports and Environment Setup
Galileo Authentication & OpenTelemetry Configuration
LangGraph Workflow Definition
Running the Workflow
Open Galileo
Access your traces
Find your traces
astronomy_qa_session
validate_input
generate_response
format_answer
Explore the timeline
.env
file is properly configured and located in the project root.
GALILEO_CONSOLE_URL
if using custom deploymentGALILEO_API_KEY
is correct and activeuv sync
Enable Console Export
Check Environment Loading
.env
variables are loadedValidate Network
Review Logs