For more control and auto-instrumentation of all providers:
Copy
import { init } from '@untrace/sdk';// Initialize Untraceinit({ apiKey: 'utr_your_api_key', serviceName: 'my-app', environment: 'production'});// Now import your LLM libraries - they're auto-instrumentedimport OpenAI from 'openai';import Anthropic from '@anthropic-ai/sdk';const openai = new OpenAI();const anthropic = new Anthropic();// All calls are automatically traced
# Untrace works with all providers simultaneouslyimport openaiimport anthropicfrom langchain.chat_models import ChatOpenAI# All are automatically instrumentedopenai_client = openai.OpenAI()anthropic_client = anthropic.Anthropic()langchain_model = ChatOpenAI()# Traces from all providers flow through Untrace