{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "comet-ml-opik--trace-an-llm-app-with-opik-track",
 "repo": "comet-ml/opik",
 "repo_url": "https://github.com/comet-ml/opik",
 "repo_slug": "comet-ml-opik",
 "title": "Trace every LLM and tool call in your app",
 "page_title": "How to trace every LLM and tool call in your app with Opik",
 "summary": "Wrap functions with @track so each call, including nested ones, shows up as a trace you can inspect.",
 "who": "A developer debugging an agent that sometimes gives wrong answers.",
 "problem": "Without traces you cannot see which step of a multi-step agent went wrong.",
 "outcome": "Full agent and pipeline traces logged to Opik for every call.",
 "steps": [
  "Install the SDK with `pip install opik`",
  "Run `opik configure` and enter your server address or Comet API key and workspace",
  "Decorate your functions with @track from Opik",
  "Run the app and open the traces; use one of the integrations such as LangChain or LiteLLM if you already use them"
 ],
 "agent_prompt": "Using comet-ml/opik, install it with `pip install opik`, run `opik configure`, add @track to the main functions of <my LLM app>, run it once, and summarize the trace tree that was logged.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "This card is written from the comet-ml/opik README, not from a test run by Deduped. Before you start, make sure you have Python with pip. Check the repo for newer instructions before you rely on these steps.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python with pip; install with `pip install opik`",
  "An Opik server: Comet.com cloud, or self-hosted with Docker (Kubernetes and Helm for larger setups)",
  "Optional: uv for `uvx opik mcp configure`"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "privacy",
   "notice": "Prompts and outputs are logged to the Opik server; self-host it if they contain sensitive data."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/comet-ml-opik/trace-an-llm-app-with-opik-track/",
 "md": "https://dedupedai.com/use-cases/comet-ml-opik/trace-an-llm-app-with-opik-track/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/comet-ml-opik--trace-an-llm-app-with-opik-track.json",
 "api_version": "v1"
}
