Gentrace automatically collects spans from compliant automatic instrumentations, for example from the
AI SDK or Pydantic AI SDK, with minimal global configuration.Here are guides for automatic instrumentations:
Where automatic instrumentations are not available, you can manually construct spans in compliance with the
OpenTelemetry specification.Learn more about manual instrumentation.
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Gentrace","colors":{"primary":"#ADE02D","light":"#2DC23F","dark":"#2B3222"},"logo":{"light":"https://mintcdn.com/gentrace/9dIPysEl4JbHm2X9/logo/light.svg?fit=max\u0026auto=format\u0026n=9dIPysEl4JbHm2X9\u0026q=85\u0026s=b7182836c36427d695746d932aa80582","dark":"https://mintcdn.com/gentrace/9dIPysEl4JbHm2X9/logo/dark.svg?fit=max\u0026auto=format\u0026n=9dIPysEl4JbHm2X9\u0026q=85\u0026s=2feb2992f5567794c603872c6d0479ef"},"favicon":"/favicon.svg","navbar":{"links":[{"label":"Support","href":"mailto:support@gentrace.com"}],"primary":{"type":"button","label":"Dashboard","href":"https://gentrace.ai/t"}},"footer":{"socials":{"x":"https://x.com/gentraceai","github":"https://github.com/gentrace","linkedin":"https://linkedin.com/company/gentrace"}},"seo":{"metatags":{"og:image":"/images/og-image.png","og:title":"Gentrace Documentation","og:description":"Intuitive evals for intelligent applications","twitter:card":"summary_large_image"}},"banner":{"content":"Viewing Gentrace v2 documentation\u0026nbsp;\u0026nbsp;[View Gentrace v1](https://v1.gentrace.ai/docs)","dismissible":false},"contextual":{"options":["copy","view","chatgpt","claude"]},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gentrace","hasAudioNarration":false,"actualSubdomain":"gentrace","customDomains":["next.gentrace.ai"],"gitSource":{"type":"github","owner":"gentrace","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e70903d4026a3ef77ab2","collectionId":"b61d7169-2b4d-4ce1-b506-f0f317b5a9a9","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21e70903d4026a3ef77ab2:success","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"Documentation","count":39},{"language":"default","tag":"API Reference","count":16},{"language":"default","tag":"Integrations","count":9},{"language":"default","tag":"Error analysis","count":5},{"language":"default","tag":"Evaluation","count":5},{"language":"default","tag":"Tracing","count":5},{"language":"default","tag":"Administration","count":4},{"language":"default","tag":"Getting started","count":4},{"language":"default","tag":"SDK Entities","count":4},{"language":"default","tag":"Datasets","count":4}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"html.dark{--primary-light:251, 255, 247!important}.prose,.text-2xl,.text-3xl,.text-4xl,.text-5xl,.text-6xl,.text-7xl,.text-8xl,.text-9xl,.text-base,.text-lg,.text-sm,.text-xl,body,html{font-family:'Roboto',Arial,sans-serif!important}.font-mono,.prose code,.prose pre,code,pre{font-family:'Roboto Mono','RobotoMono','Menlo','Monaco','Consolas',monospace!important}#topbar-cta-button a span.absolute{background-color:#b9f030;background-image:linear-gradient(#b9f030 99%,#e8f932);border-bottom:1px solid #090a08}#topbar-cta-button a:hover span.absolute{background-image:linear-gradient(#b9f030 ,#e8f932)}#topbar-cta-button a span.text-white,#topbar-cta-button svg{color:#090a08!important}.nav-tabs-item[aria-selected=true] .absolute.bottom-0{background:#b9f030!important;height:2px!important}.dark\\:bg-primary-light:is(.dark *){background:#b9f030!important}button.group.p-2.flex.items-center.justify-center[aria-label='Toggle dark mode']{display:none!important}:root{color-scheme:dark!important}html{color-scheme:dark!important;forced-color-adjust:none!important}:root:not(.dark){color-scheme:dark!important}.dark\\:hidden,button[aria-label='Toggle dark mode']{display:none!important}.hidden.dark\\:block{display:block!important}.dark\\:text-primary-light,.text-primary{color:#fbfff7!important}.dark\\:bg-primary-light\\/10:is(.dark *){background-color:rgb(var(--primary-light)/.1)!important}.prose a:has(>div.w-6.h-6){border-bottom:none!important}.prose :where(a:hover):not(:where([class~='not-prose'], [class~='not-prose'] *)){border-bottom-color:rgb(var(--primary-light))}.dark\\:\\[\\\u0026_mark_b\\]\\:text-primary-light mark b:is(.dark *){--tw-text-opacity:1;color:#b9f030!important}.prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)){border-color:rgb(var(--primary-light))!important}#banner,#banner.bg-primary-dark{background-color:#1a1b1b!important;border-bottom:1px solid rgba(255,255,255,.1)!important}#banner{--primary-dark:26, 27, 27!important}#banner a,#banner button:hover,#banner p{color:#fff!important}#banner a,#banner a:hover{text-decoration:underline!important;border:0!important}#banner a{text-underline-offset:2px;opacity:.9}#banner a:hover{opacity:1}#banner button{color:rgba(255,255,255,.8)!important}"}],"page":{"pagePath":"tracing/instrumentations","slug":"/tracing/instrumentations","pageMetadata":{"title":"Instrumentations","description":"How to instrument your LLM calls with Gentrace","href":"/tracing/instrumentations"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How to instrument your LLM calls with Gentrace\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,li:`li`,p:`p`,ul:`ul`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`This document assumes you have already:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/getting-started/initialization`,children:`initialized`}),` the Gentrace SDK`]}),`\n`,_jsxs(_components.li,{children:[`setup your first `,_jsx(_components.a,{href:`/tracing/interactions`,children:`interaction`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`1`,id:`automatic-instrumentations`,children:`Automatic instrumentations`}),`\n`,_jsxs(_components.p,{children:[`Gentrace automatically collects spans from compliant automatic instrumentations, for example from the\n`,_jsx(_components.a,{href:`/integrations/ai-sdk`,children:`AI SDK`}),` or `,_jsx(_components.a,{href:`/integrations/pydantic-ai`,children:`Pydantic AI SDK`}),`, with minimal global configuration.`]}),`\n`,_jsx(_components.p,{children:`Here are guides for automatic instrumentations:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/ai-sdk`,children:`AI SDK`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/pydantic-ai`,children:`Pydantic AI SDK`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/openai-python`,children:`OpenAI`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/openai-agents`,children:`OpenAI Agents`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/langchain`,children:`LangChain`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/langgraph`,children:`LangGraph`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/mastra`,children:`Mastra`})}),`\n`]}),`\n`,_jsx(Heading,{level:`1`,id:`manual-instrumentation`,children:`Manual instrumentation`}),`\n`,_jsx(_components.p,{children:`Where automatic instrumentations are not available, you can manually construct spans in compliance with the\nOpenTelemetry specification.`}),`\n`,_jsxs(_components.p,{children:[`Learn more about `,_jsx(_components.a,{href:`/tracing/manual-instrumentation`,children:`manual instrumentation`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Instrumentations","description":"How to instrument your LLM calls with Gentrace","href":"/tracing/instrumentations"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":1,"children":[]},{"title":"Automatic instrumentations","slug":"automatic-instrumentations","depth":1,"children":[]},{"title":"Manual instrumentation","slug":"manual-instrumentation","depth":1,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/gentrace/0327c0bae5ad6d94/scripts/force-dark-mode.js"],"subdomain":"gentrace","siteName":"Gentrace","title":"Gentrace Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-08-18T19:20:03.808Z","originalFileLocation":"tracing/instrumentations.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How to instrument your LLM calls with Gentrace\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gentrace\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Gentrace Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Intuitive evals for intelligent applications\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gentrace\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://next.gentrace.ai/docs/tracing/instrumentations\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gentrace.mintlify.app/images/og-image.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Gentrace Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Intuitive evals for intelligent applications\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gentrace.mintlify.app/images/og-image.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/gentrace/f9WvW_SqnkpTike4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gentrace\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ADE02D\">\u003clink data-mint-head rel=\"canonical\" href=\"https://next.gentrace.ai/docs/tracing/instrumentations\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/tracing/instrumentations.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://next.gentrace.ai/#organization\",\"name\":\"Gentrace\",\"url\":\"https://next.gentrace.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gentrace/9dIPysEl4JbHm2X9/logo/light.svg?fit=max\u0026auto=format\u0026n=9dIPysEl4JbHm2X9\u0026q=85\u0026s=b7182836c36427d695746d932aa80582\"}},{\"@type\":\"WebSite\",\"@id\":\"https://next.gentrace.ai/docs#website\",\"name\":\"Gentrace\",\"url\":\"https://next.gentrace.ai/docs\",\"publisher\":{\"@id\":\"https://next.gentrace.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://next.gentrace.ai/docs/tracing/instrumentations#webpage\",\"url\":\"https://next.gentrace.ai/docs/tracing/instrumentations\",\"name\":\"Instrumentations\",\"description\":\"How to instrument your LLM calls with Gentrace\",\"dateModified\":\"2025-08-18T19:20:03.808Z\",\"isPartOf\":{\"@id\":\"https://next.gentrace.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://next.gentrace.ai/docs/tracing/instrumentations#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://next.gentrace.ai/docs/tracing/instrumentations#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tracing\",\"item\":\"https://next.gentrace.ai/docs/tracing/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Instrumentations\",\"item\":\"https://next.gentrace.ai/docs/tracing/instrumentations\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://next.gentrace.ai/docs/tracing/instrumentations#article\",\"headline\":\"Instrumentations\",\"name\":\"Instrumentations\",\"description\":\"How to instrument your LLM calls with Gentrace\",\"url\":\"https://next.gentrace.ai/docs/tracing/instrumentations\",\"mainEntityOfPage\":{\"@id\":\"https://next.gentrace.ai/docs/tracing/instrumentations#webpage\"},\"image\":\"https://next.gentrace.ai/images/og-image.png\",\"dateModified\":\"2025-08-18T19:20:03.808Z\",\"publisher\":{\"@id\":\"https://next.gentrace.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://next.gentrace.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gentrace\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Gentrace","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting started","pages":[{"title":"Get started","href":"/getting-started/overview"},{"title":"Quickstart","href":"/getting-started/quickstart"},{"title":"Installation","href":"/getting-started/installation"},{"title":"Initialization","href":"/getting-started/initialization"}]},{"group":"Error analysis","pages":[{"title":"Overview","href":"/error-analysis/overview"},{"title":"Gentrace Chat","href":"/error-analysis/chat"},{"title":"Derivations","href":"/error-analysis/derivations"},{"title":"Views","href":"/error-analysis/views"},{"title":"Alerting","href":"/error-analysis/alerting"}]},{"group":"Tracing","pages":[{"title":"Overview","href":"/tracing/overview"},{"title":"interaction()","href":"/tracing/interactions"},{"title":"traced()","description":"Wrap any function with OpenTelemetry tracing to automatically track its execution","href":"/tracing/traced"},{"title":"Instrumentations","href":"/tracing/instrumentations"},{"title":"Manual LLM instrumentation","description":"How to manually construct spans in compliance with the OpenTelemetry specification","href":"/tracing/manual-instrumentation"}]},{"group":"Evaluation","pages":[{"title":"Overview","href":"/evaluation/overview"},{"title":"Experiments","href":"/evaluation/experiments"},{"title":"Datasets","href":"/evaluation/datasets"},{"title":"Unit tests","href":"/evaluation/unit-tests"},{"title":"Dataset tests","href":"/evaluation/dataset-tests"}]},{"group":"Integrations","pages":[{"title":"AI SDK","href":"/integrations/ai-sdk"},{"title":"LangChain","href":"/integrations/langchain"},{"title":"LangGraph","href":"/integrations/langgraph"},{"title":"Mastra","href":"/integrations/mastra"},{"title":"Next.js","href":"/integrations/nextjs"},{"title":"OpenAI Agents","href":"/integrations/openai-agents"},{"title":"OpenAI (JS)","href":"/integrations/openai-js"},{"title":"OpenAI (Python)","href":"/integrations/openai-python"},{"title":"Pydantic AI","href":"/integrations/pydantic-ai"}]},{"group":"Administration","pages":[{"title":"Single sign-on (SSO)","href":"/administration/sso"},{"title":"SCIM","href":"/administration/scim"},{"title":"Roles","href":"/administration/roles"},{"title":"Self-hosted deployment","href":"/administration/self-hosted"}]},{"group":"Reference","pages":[{"title":"OpenTelemetry guide","href":"/reference/opentelemetry-guide"},{"title":"OpenTelemetry API","href":"/reference/opentelemetry-api"},{"title":"SDK Errors","href":"/reference/sdk-errors"}]},{"group":"SDK Entities","pages":[{"title":"Datasets","href":"/sdk-entities/datasets"},{"title":"Experiments","href":"/sdk-entities/experiments"},{"title":"Pipelines","href":"/sdk-entities/pipelines"},{"title":"Test Cases","href":"/sdk-entities/test-cases"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/pipelines/list-pipelines"}]}]},"title":"Gentrace Documentation","buildId":"dpl_BtCp1ySSRiZuC61kdwjLNfcZF9iT","deploymentId":"dpl_BtCp1ySSRiZuC61kdwjLNfcZF9iT","dynamics":["10e4515597"],"chunks":["BannerMarkdown-pgss_aO2.js","dist-DusJ_COf.js","lib--scc4DXi.js","lib-B8HbPgcC.js","clsx-CQdVN3oC.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}