Master Langtrace with our step-by-step tutorial, detailed feature walkthrough, and expert tips.
Sign up for a free Langtrace account at langtrace.ai or choose self
hosted deployment Install the Langtrace SDK for your programming language (pip install langtrace
sdk or npm install langtrace) Initialize the SDK in your application with your project API key using Langtrace.init() Run your LLM application — traces will automatically appear in the Langtrace dashboard Explore the waterfall visualizations and cost tracking to optimize your agent performance
💡 Quick Start: Follow these 3 steps in order to get up and running with Langtrace quickly.
Explore the key features that make Langtrace powerful for analytics & monitoring workflows.
All Langtrace spans conform to the emerging OpenTelemetry GenAI semantic conventions, so prompts, completions, token counts, model parameters, tool calls, and retrieval results are stored in standardized attributes. This means traces can be exported via OTLP to Grafana Tempo, Datadog, Signoz, Jaeger, or any compliant backend without transformation, giving teams full portability over their telemetry data and avoiding vendor lock-in.
Initialization takes two lines: import the SDK and call init with an API key. Every supported LLM, framework, and vector DB call is then traced automatically with full prompt content, completion text, token counts, latency, and cost — no manual span creation required. The Python SDK supports OpenAI, Anthropic, Gemini, Cohere, Groq, Mistral, Perplexity, Ollama, LangChain, LlamaIndex, CrewAI, DSPy, AutoGen, Pinecone, Chroma, Weaviate, and Qdrant. The TypeScript SDK covers a similar set of providers and frameworks.
Aggregated dashboards display cost per model, user, project, prompt template, and time range, alongside p50/p95/p99 latency for individual operations and full traces. Cost is calculated automatically using each provider's published token pricing. Teams use these dashboards to set budget alerts, identify cost spikes from specific features or tenants, and present attribution data to finance stakeholders for AI infrastructure spend.
Saved prompts can be versioned, edited, and tested across multiple models in a side-by-side playground. Experiment results are persisted so teams can compare output quality, latency, and cost across model versions and prompt variations before deploying changes to production. This workflow supports systematic prompt engineering rather than ad-hoc testing in notebooks.
Any production trace can be added to a dataset, labeled by human annotators, and run through built-in or custom evaluators measuring accuracy, faithfulness, toxicity, JSON schema compliance, and other quality metrics. Custom evaluator functions can be defined in Python for domain-specific scoring. This creates a feedback loop where production issues are captured, annotated, evaluated, and used to validate fixes before redeployment.
A single Docker Compose file launches the server, Postgres for metadata, and ClickHouse for high-performance trace storage. Kubernetes Helm charts are available for production deployments that require horizontal scaling. Self-hosted instances receive all features available in the managed Cloud offering, with the only trade-off being that teams manage their own infrastructure, upgrades, and backups.
Workspaces, projects, role-based access control, and API key scoping let larger organizations separate staging from production traffic and limit which team members can access sensitive trace data. This is essential for enterprise deployments where multiple teams share a single Langtrace instance but need isolation between their observability data and configurations.
Yes. The Langtrace server is released under the AGPL-3.0 license, while the client SDKs are licensed under Apache-2.0. This means you can freely self-host the server and use the SDKs in commercial applications. The AGPL license requires that modifications to the server be shared if you distribute the modified version, but using the hosted Cloud offering avoids any license considerations entirely. The Apache-2.0 SDK license places no copyleft obligations on your application code.
Langtrace is built natively on the OpenTelemetry standard, so traces are portable to any OTel backend such as Grafana, Datadog, or Signoz. Langfuse uses a custom schema with its own ingestion format, which provides a polished experience within its ecosystem but creates more vendor lock-in for telemetry data. Helicone operates primarily as an API proxy logger that is extremely easy to set up but has less visibility into multi-step agent workflows and framework internals. Langtrace's OTel-native approach is best suited for teams that already have observability infrastructure and want GenAI tracing to integrate with it seamlessly.
It auto-instruments 8 LLM providers: OpenAI, Anthropic, Google Gemini, Cohere, Groq, Mistral, Perplexity, and Ollama. Orchestration frameworks include LangChain, LlamaIndex, LangGraph, CrewAI, DSPy, and AutoGen. Supported vector databases include Pinecone, Chroma, Weaviate, and Qdrant. The SDK architecture is extensible, so additional providers and frameworks are added regularly as the ecosystem grows. Custom instrumentation is also supported through manual span creation for unsupported libraries.
Yes. Langtrace ships a Docker Compose setup and Kubernetes Helm charts so the server, Postgres database, ClickHouse analytics store, and UI can run in your own VPC or on-premises environment. This is particularly valuable for healthcare, finance, and government teams that cannot send raw prompts and completions to third-party SaaS providers. Self-hosted deployments receive all core features including tracing, evaluations, cost tracking, and dataset management at no licensing cost.
Yes. You can curate datasets from real production traces, annotate them with human feedback, run prompt experiments across model versions, and score outputs using built-in evaluators for accuracy, faithfulness, toxicity, and JSON schema compliance. Custom evaluator functions are also supported. This workflow enables teams to go from observing a production issue to running a scored experiment that validates a fix, all within the same platform without exporting data to external tools.
Now that you know how to use Langtrace, it's time to put this knowledge into practice.
Sign up and follow the tutorial steps
Check pros, cons, and user feedback
See how it stacks against alternatives
Follow our tutorial and master this powerful analytics & monitoring tool in minutes.
Tutorial updated March 2026