[{"data":1,"prerenderedAt":2017},["ShallowReactive",2],{"navigation_docs":3,"-logging-ai-sdk-overview":407,"-logging-ai-sdk-overview-surround":2012},[4,35,159,201,289,304,391],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",{"title":30,"path":31,"stem":32,"icon":33},"vs Other Loggers","\u002Fgetting-started\u002Fvs-other-loggers","1.getting-started\u002F5.vs-other-loggers","i-lucide-scale",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Logging","\u002Flogging","2.logging",[40,45,50,55,60,65,70,99,127],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Catalogs","\u002Flogging\u002Fcatalogs","2.logging\u002F4.catalogs","i-lucide-book-open",{"title":66,"path":67,"stem":68,"icon":69},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F5.client-logging","i-lucide-monitor",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":34},"AI SDK","i-simple-icons-vercel","\u002Flogging\u002Fai-sdk","2.logging\u002F6.ai-sdk",[76,79,84,89,94],{"title":41,"path":77,"stem":78,"icon":44},"\u002Flogging\u002Fai-sdk\u002Foverview","2.logging\u002F6.ai-sdk\u002F01.overview",{"title":80,"path":81,"stem":82,"icon":83},"Usage","\u002Flogging\u002Fai-sdk\u002Fusage","2.logging\u002F6.ai-sdk\u002F02.usage","i-lucide-code",{"title":85,"path":86,"stem":87,"icon":88},"Options","\u002Flogging\u002Fai-sdk\u002Foptions","2.logging\u002F6.ai-sdk\u002F03.options","i-lucide-sliders",{"title":90,"path":91,"stem":92,"icon":93},"Metadata","\u002Flogging\u002Fai-sdk\u002Fmetadata","2.logging\u002F6.ai-sdk\u002F04.metadata","i-lucide-database",{"title":95,"path":96,"stem":97,"icon":98},"Telemetry","\u002Flogging\u002Fai-sdk\u002Ftelemetry","2.logging\u002F6.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Flogging\u002Fbetter-auth","2.logging\u002F7.better-auth",[105,108,113,118,122],{"title":41,"path":106,"stem":107,"icon":44},"\u002Flogging\u002Fbetter-auth\u002Foverview","2.logging\u002F7.better-auth\u002F01.overview",{"title":109,"path":110,"stem":111,"icon":112},"Identify User","\u002Flogging\u002Fbetter-auth\u002Fidentify-user","2.logging\u002F7.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":114,"path":115,"stem":116,"icon":117},"Middleware","\u002Flogging\u002Fbetter-auth\u002Fmiddleware","2.logging\u002F7.better-auth\u002F03.middleware","i-lucide-shield",{"title":119,"path":120,"stem":121,"icon":69},"Client Sync","\u002Flogging\u002Fbetter-auth\u002Fclient-sync","2.logging\u002F7.better-auth\u002F04.client-sync",{"title":123,"path":124,"stem":125,"icon":126},"Performance","\u002Flogging\u002Fbetter-auth\u002Fperformance","2.logging\u002F7.better-auth\u002F05.performance","i-lucide-gauge",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":34},"Audit Logs","i-lucide-shield-check","\u002Flogging\u002Faudit","2.logging\u002F8.audit",[133,136,141,146,151,155],{"title":41,"path":134,"stem":135,"icon":44},"\u002Flogging\u002Faudit\u002Foverview","2.logging\u002F8.audit\u002F01.overview",{"title":137,"path":138,"stem":139,"icon":140},"Schema","\u002Flogging\u002Faudit\u002Fschema","2.logging\u002F8.audit\u002F02.schema","i-lucide-file-text",{"title":142,"path":143,"stem":144,"icon":145},"Recording","\u002Flogging\u002Faudit\u002Frecording","2.logging\u002F8.audit\u002F03.recording","i-lucide-pen-line",{"title":147,"path":148,"stem":149,"icon":150},"Drains","\u002Flogging\u002Faudit\u002Fpipeline","2.logging\u002F8.audit\u002F04.pipeline","i-lucide-link",{"title":152,"path":153,"stem":154,"icon":129},"Compliance","\u002Flogging\u002Faudit\u002Fcompliance","2.logging\u002F8.audit\u002F05.compliance",{"title":156,"path":157,"stem":158,"icon":64},"Recipes","\u002Flogging\u002Faudit\u002Frecipes","2.logging\u002F8.audit\u002F06.recipes",{"title":160,"path":161,"stem":162,"children":163,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[164,169,174,179,184,188,191,196],{"title":165,"path":166,"stem":167,"icon":168},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":170,"path":171,"stem":172,"icon":173},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":175,"path":176,"stem":177,"icon":178},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":180,"path":181,"stem":182,"icon":183},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":185,"path":186,"stem":187,"icon":129},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":123,"path":189,"stem":190,"icon":126},"\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance",{"title":192,"path":193,"stem":194,"icon":195},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":197,"path":198,"stem":199,"icon":200},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":202,"path":203,"stem":204,"children":205,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[206,210,215,220,225,230,235,240,245,250,255,260,265,270,274,279,284],{"title":41,"path":207,"stem":208,"icon":209},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":211,"path":212,"stem":213,"icon":214},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":216,"path":217,"stem":218,"icon":219},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":221,"path":222,"stem":223,"icon":224},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":226,"path":227,"stem":228,"icon":229},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":231,"path":232,"stem":233,"icon":234},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":236,"path":237,"stem":238,"icon":239},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":241,"path":242,"stem":243,"icon":244},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":246,"path":247,"stem":248,"icon":249},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":251,"path":252,"stem":253,"icon":254},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":256,"path":257,"stem":258,"icon":259},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":261,"path":262,"stem":263,"icon":264},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":266,"path":267,"stem":268,"icon":269},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":271,"path":272,"stem":273,"icon":183},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":275,"path":276,"stem":277,"icon":278},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":280,"path":281,"stem":282,"icon":283},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":285,"path":286,"stem":287,"icon":288},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":290,"path":291,"stem":292,"children":293,"page":34},"Build on top","\u002Fbuild-on-top","5.build-on-top",[294,299],{"title":295,"path":296,"stem":297,"icon":298},"Identity headers","\u002Fbuild-on-top\u002Fidentity-headers","5.build-on-top\u002F1.identity-headers","i-lucide-fingerprint",{"title":300,"path":301,"stem":302,"icon":303},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F4.fs-reader","i-lucide-folder-search",{"title":305,"path":306,"stem":307,"children":308,"page":34},"Adapters","\u002Fadapters","6.adapters",[309,312,352,367],{"title":41,"path":310,"stem":311,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":313,"path":314,"stem":315,"children":316,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[317,322,327,332,337,342,347],{"title":318,"path":319,"stem":320,"icon":321},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":323,"path":324,"stem":325,"icon":326},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":328,"path":329,"stem":330,"icon":331},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":333,"path":334,"stem":335,"icon":336},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":338,"path":339,"stem":340,"icon":341},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":343,"path":344,"stem":345,"icon":346},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":348,"path":349,"stem":350,"icon":351},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":353,"path":354,"stem":355,"children":356,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[357,362],{"title":358,"path":359,"stem":360,"icon":361},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":363,"path":364,"stem":365,"icon":366},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":368,"path":369,"stem":370,"children":371,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[372,377,382,386],{"title":373,"path":374,"stem":375,"icon":376},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":378,"path":379,"stem":380,"icon":381},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":383,"path":384,"stem":385,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":387,"path":388,"stem":389,"icon":390},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":392,"path":393,"stem":394,"children":395,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[396,399,403],{"title":41,"path":397,"stem":398,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":400,"path":401,"stem":402,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":404,"path":405,"stem":406,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":408,"title":409,"body":410,"description":1999,"extension":2000,"links":2001,"meta":2008,"navigation":2009,"path":77,"seo":2010,"stem":78,"__hash__":2011},"docs\u002F2.logging\u002F6.ai-sdk\u002F01.overview.md","AI SDK Integration",{"type":411,"value":412,"toc":1992},"minimark",[413,421,474,479,482,553,556,559,562,886,889,1197,1201,1211,1315,1318,1322,1351,1355,1360,1988],[414,415,416,420],"p",{},[417,418,419],"code",{},"evlog\u002Fai"," gives you full AI observability by wrapping your model with middleware. Token usage, tool calls, streaming performance, cache hits, reasoning tokens, and cost estimation — all captured into the wide event automatically.",[422,423,426,429,460],"prompt",{":actions":424,"description":425,"icon":72},"[\"copy\",\"cursor\",\"windsurf\"]","Add AI observability with evlog",[414,427,428],{},"Add AI observability to my app with evlog.",[430,431,432,436,439,442,445,448,451,454,457],"ul",{},[433,434,435],"li",{},"Install the AI SDK: pnpm add ai",[433,437,438],{},"Import createAILogger from 'evlog\u002Fai'",[433,440,441],{},"Create an AI logger with createAILogger(log) where log is your request logger",[433,443,444],{},"Wrap your model with ai.wrap('anthropic\u002Fclaude-sonnet-4.6') and pass it to generateText, streamText, etc.",[433,446,447],{},"Token usage, tool calls, streaming metrics, and errors are captured automatically into the wide event",[433,449,450],{},"For deeper observability (tool execution timing, total generation wall time), add createEvlogIntegration(ai) to experimental_telemetry.integrations",[433,452,453],{},"For embedding calls, use ai.captureEmbed({ usage, model, dimensions, count }) after embed() or embedMany()",[433,455,456],{},"For cost estimation, pass a cost map: createAILogger(log, { cost: { 'claude-sonnet-4.6': { input: 3, output: 15 } } })",[433,458,459],{},"Works with all frameworks: Nuxt, Express, Hono, Fastify, NestJS, Elysia, standalone",[414,461,462,463,469,470],{},"Docs: ",[464,465,466],"a",{"href":466,"rel":467},"https:\u002F\u002Fwww.evlog.dev\u002Flogging\u002Fai-sdk\u002Foverview",[468],"nofollow","\nAdapters: ",[464,471,472],{"href":472,"rel":473},"https:\u002F\u002Fwww.evlog.dev\u002Fadapters",[468],[475,476,478],"h2",{"id":477},"install","Install",[414,480,481],{},"Add the AI SDK as a dependency:",[483,484,485,510,524,538],"code-group",{},[486,487,493],"pre",{"className":488,"code":489,"filename":490,"language":491,"meta":492,"style":492},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add ai\n","pnpm","bash","",[417,494,495],{"__ignoreMap":492},[496,497,500,503,507],"span",{"class":498,"line":499},"line",1,[496,501,490],{"class":502},"sBMFI",[496,504,506],{"class":505},"sfazB"," add",[496,508,509],{"class":505}," ai\n",[486,511,514],{"className":488,"code":512,"filename":513,"language":491,"meta":492,"style":492},"bun add ai\n","bun",[417,515,516],{"__ignoreMap":492},[496,517,518,520,522],{"class":498,"line":499},[496,519,513],{"class":502},[496,521,506],{"class":505},[496,523,509],{"class":505},[486,525,528],{"className":488,"code":526,"filename":527,"language":491,"meta":492,"style":492},"yarn add ai\n","yarn",[417,529,530],{"__ignoreMap":492},[496,531,532,534,536],{"class":498,"line":499},[496,533,527],{"class":502},[496,535,506],{"class":505},[496,537,509],{"class":505},[486,539,542],{"className":488,"code":540,"filename":541,"language":491,"meta":492,"style":492},"npm install ai\n","npm",[417,543,544],{"__ignoreMap":492},[496,545,546,548,551],{"class":498,"line":499},[496,547,541],{"class":502},[496,549,550],{"class":505}," install",[496,552,509],{"class":505},[475,554,20],{"id":555},"quick-start",[557,558],"ai-sdk-wide-event",{},[414,560,561],{},"Two lines to add, one param to change:",[483,563,564,694],{},[486,565,570],{"className":566,"code":567,"filename":568,"language":569,"meta":492,"style":492},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineEventHandler(async (event) => {\n  const result = streamText({\n    model: 'anthropic\u002Fclaude-sonnet-4.6',\n    messages,\n  })\n  return result.toTextStreamResponse()\n})\n","Before","typescript",[417,571,572,610,631,652,660,669,686],{"__ignoreMap":492},[496,573,574,578,581,585,589,593,597,601,604,607],{"class":498,"line":499},[496,575,577],{"class":576},"s7zQu","export",[496,579,580],{"class":576}," default",[496,582,584],{"class":583},"s2Zo4"," defineEventHandler",[496,586,588],{"class":587},"sTEyZ","(",[496,590,592],{"class":591},"spNyl","async",[496,594,596],{"class":595},"sMK4o"," (",[496,598,600],{"class":599},"sHdIc","event",[496,602,603],{"class":595},")",[496,605,606],{"class":591}," =>",[496,608,609],{"class":595}," {\n",[496,611,613,616,619,622,625,628],{"class":498,"line":612},2,[496,614,615],{"class":591},"  const",[496,617,618],{"class":587}," result",[496,620,621],{"class":595}," =",[496,623,624],{"class":583}," streamText",[496,626,588],{"class":627},"swJcz",[496,629,630],{"class":595},"{\n",[496,632,634,637,640,643,646,649],{"class":498,"line":633},3,[496,635,636],{"class":627},"    model",[496,638,639],{"class":595},":",[496,641,642],{"class":595}," '",[496,644,645],{"class":505},"anthropic\u002Fclaude-sonnet-4.6",[496,647,648],{"class":595},"'",[496,650,651],{"class":595},",\n",[496,653,655,658],{"class":498,"line":654},4,[496,656,657],{"class":587},"    messages",[496,659,651],{"class":595},[496,661,663,666],{"class":498,"line":662},5,[496,664,665],{"class":595},"  }",[496,667,668],{"class":627},")\n",[496,670,672,675,677,680,683],{"class":498,"line":671},6,[496,673,674],{"class":576},"  return",[496,676,618],{"class":587},[496,678,679],{"class":595},".",[496,681,682],{"class":583},"toTextStreamResponse",[496,684,685],{"class":627},"()\n",[496,687,689,692],{"class":498,"line":688},7,[496,690,691],{"class":595},"}",[496,693,668],{"class":587},[486,695,698],{"className":566,"code":696,"filename":697,"language":569,"meta":492,"style":492},"import { useLogger } from 'evlog'\nimport { createAILogger } from 'evlog\u002Fai'\n\nexport default defineEventHandler(async (event) => {\n  const log = useLogger(event)\n  const ai = createAILogger(log)\n\n  const result = streamText({\n    model: ai.wrap('anthropic\u002Fclaude-sonnet-4.6'),\n    messages,\n  })\n  return result.toTextStreamResponse()\n})\n","After",[417,699,700,725,744,750,772,789,807,811,826,852,859,866,879],{"__ignoreMap":492},[496,701,702,705,708,711,714,717,719,722],{"class":498,"line":499},[496,703,704],{"class":576},"import",[496,706,707],{"class":595}," {",[496,709,710],{"class":587}," useLogger",[496,712,713],{"class":595}," }",[496,715,716],{"class":576}," from",[496,718,642],{"class":595},[496,720,721],{"class":505},"evlog",[496,723,724],{"class":595},"'\n",[496,726,727,729,731,734,736,738,740,742],{"class":498,"line":612},[496,728,704],{"class":576},[496,730,707],{"class":595},[496,732,733],{"class":587}," createAILogger",[496,735,713],{"class":595},[496,737,716],{"class":576},[496,739,642],{"class":595},[496,741,419],{"class":505},[496,743,724],{"class":595},[496,745,746],{"class":498,"line":633},[496,747,749],{"emptyLinePlaceholder":748},true,"\n",[496,751,752,754,756,758,760,762,764,766,768,770],{"class":498,"line":654},[496,753,577],{"class":576},[496,755,580],{"class":576},[496,757,584],{"class":583},[496,759,588],{"class":587},[496,761,592],{"class":591},[496,763,596],{"class":595},[496,765,600],{"class":599},[496,767,603],{"class":595},[496,769,606],{"class":591},[496,771,609],{"class":595},[496,773,774,776,779,781,783,785,787],{"class":498,"line":662},[496,775,615],{"class":591},[496,777,778],{"class":587}," log",[496,780,621],{"class":595},[496,782,710],{"class":583},[496,784,588],{"class":627},[496,786,600],{"class":587},[496,788,668],{"class":627},[496,790,791,793,796,798,800,802,805],{"class":498,"line":671},[496,792,615],{"class":591},[496,794,795],{"class":587}," ai",[496,797,621],{"class":595},[496,799,733],{"class":583},[496,801,588],{"class":627},[496,803,804],{"class":587},"log",[496,806,668],{"class":627},[496,808,809],{"class":498,"line":688},[496,810,749],{"emptyLinePlaceholder":748},[496,812,814,816,818,820,822,824],{"class":498,"line":813},8,[496,815,615],{"class":591},[496,817,618],{"class":587},[496,819,621],{"class":595},[496,821,624],{"class":583},[496,823,588],{"class":627},[496,825,630],{"class":595},[496,827,829,831,833,835,837,840,842,844,846,848,850],{"class":498,"line":828},9,[496,830,636],{"class":627},[496,832,639],{"class":595},[496,834,795],{"class":587},[496,836,679],{"class":595},[496,838,839],{"class":583},"wrap",[496,841,588],{"class":627},[496,843,648],{"class":595},[496,845,645],{"class":505},[496,847,648],{"class":595},[496,849,603],{"class":627},[496,851,651],{"class":595},[496,853,855,857],{"class":498,"line":854},10,[496,856,657],{"class":587},[496,858,651],{"class":595},[496,860,862,864],{"class":498,"line":861},11,[496,863,665],{"class":595},[496,865,668],{"class":627},[496,867,869,871,873,875,877],{"class":498,"line":868},12,[496,870,674],{"class":576},[496,872,618],{"class":587},[496,874,679],{"class":595},[496,876,682],{"class":583},[496,878,685],{"class":627},[496,880,882,884],{"class":498,"line":881},13,[496,883,691],{"class":595},[496,885,668],{"class":587},[414,887,888],{},"Your wide event now includes:",[486,890,895],{"className":891,"code":892,"filename":893,"language":894,"meta":492,"style":492},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"method\": \"POST\",\n  \"path\": \"\u002Fapi\u002Fchat\",\n  \"status\": 200,\n  \"duration\": \"4.5s\",\n  \"ai\": {\n    \"calls\": 1,\n    \"model\": \"claude-sonnet-4.6\",\n    \"provider\": \"anthropic\",\n    \"inputTokens\": 3312,\n    \"outputTokens\": 814,\n    \"totalTokens\": 4126,\n    \"reasoningTokens\": 225,\n    \"finishReason\": \"stop\",\n    \"msToFirstChunk\": 234,\n    \"msToFinish\": 4500,\n    \"tokensPerSecond\": 180\n  }\n}\n","Wide Event","json",[417,896,897,901,924,944,961,981,994,1011,1031,1051,1067,1083,1099,1115,1136,1153,1170,1185,1191],{"__ignoreMap":492},[496,898,899],{"class":498,"line":499},[496,900,630],{"class":595},[496,902,903,906,909,912,914,917,920,922],{"class":498,"line":612},[496,904,905],{"class":595},"  \"",[496,907,908],{"class":591},"method",[496,910,911],{"class":595},"\"",[496,913,639],{"class":595},[496,915,916],{"class":595}," \"",[496,918,919],{"class":505},"POST",[496,921,911],{"class":595},[496,923,651],{"class":595},[496,925,926,928,931,933,935,937,940,942],{"class":498,"line":633},[496,927,905],{"class":595},[496,929,930],{"class":591},"path",[496,932,911],{"class":595},[496,934,639],{"class":595},[496,936,916],{"class":595},[496,938,939],{"class":505},"\u002Fapi\u002Fchat",[496,941,911],{"class":595},[496,943,651],{"class":595},[496,945,946,948,951,953,955,959],{"class":498,"line":654},[496,947,905],{"class":595},[496,949,950],{"class":591},"status",[496,952,911],{"class":595},[496,954,639],{"class":595},[496,956,958],{"class":957},"sbssI"," 200",[496,960,651],{"class":595},[496,962,963,965,968,970,972,974,977,979],{"class":498,"line":662},[496,964,905],{"class":595},[496,966,967],{"class":591},"duration",[496,969,911],{"class":595},[496,971,639],{"class":595},[496,973,916],{"class":595},[496,975,976],{"class":505},"4.5s",[496,978,911],{"class":595},[496,980,651],{"class":595},[496,982,983,985,988,990,992],{"class":498,"line":671},[496,984,905],{"class":595},[496,986,987],{"class":591},"ai",[496,989,911],{"class":595},[496,991,639],{"class":595},[496,993,609],{"class":595},[496,995,996,999,1002,1004,1006,1009],{"class":498,"line":688},[496,997,998],{"class":595},"    \"",[496,1000,1001],{"class":502},"calls",[496,1003,911],{"class":595},[496,1005,639],{"class":595},[496,1007,1008],{"class":957}," 1",[496,1010,651],{"class":595},[496,1012,1013,1015,1018,1020,1022,1024,1027,1029],{"class":498,"line":813},[496,1014,998],{"class":595},[496,1016,1017],{"class":502},"model",[496,1019,911],{"class":595},[496,1021,639],{"class":595},[496,1023,916],{"class":595},[496,1025,1026],{"class":505},"claude-sonnet-4.6",[496,1028,911],{"class":595},[496,1030,651],{"class":595},[496,1032,1033,1035,1038,1040,1042,1044,1047,1049],{"class":498,"line":828},[496,1034,998],{"class":595},[496,1036,1037],{"class":502},"provider",[496,1039,911],{"class":595},[496,1041,639],{"class":595},[496,1043,916],{"class":595},[496,1045,1046],{"class":505},"anthropic",[496,1048,911],{"class":595},[496,1050,651],{"class":595},[496,1052,1053,1055,1058,1060,1062,1065],{"class":498,"line":854},[496,1054,998],{"class":595},[496,1056,1057],{"class":502},"inputTokens",[496,1059,911],{"class":595},[496,1061,639],{"class":595},[496,1063,1064],{"class":957}," 3312",[496,1066,651],{"class":595},[496,1068,1069,1071,1074,1076,1078,1081],{"class":498,"line":861},[496,1070,998],{"class":595},[496,1072,1073],{"class":502},"outputTokens",[496,1075,911],{"class":595},[496,1077,639],{"class":595},[496,1079,1080],{"class":957}," 814",[496,1082,651],{"class":595},[496,1084,1085,1087,1090,1092,1094,1097],{"class":498,"line":868},[496,1086,998],{"class":595},[496,1088,1089],{"class":502},"totalTokens",[496,1091,911],{"class":595},[496,1093,639],{"class":595},[496,1095,1096],{"class":957}," 4126",[496,1098,651],{"class":595},[496,1100,1101,1103,1106,1108,1110,1113],{"class":498,"line":881},[496,1102,998],{"class":595},[496,1104,1105],{"class":502},"reasoningTokens",[496,1107,911],{"class":595},[496,1109,639],{"class":595},[496,1111,1112],{"class":957}," 225",[496,1114,651],{"class":595},[496,1116,1118,1120,1123,1125,1127,1129,1132,1134],{"class":498,"line":1117},14,[496,1119,998],{"class":595},[496,1121,1122],{"class":502},"finishReason",[496,1124,911],{"class":595},[496,1126,639],{"class":595},[496,1128,916],{"class":595},[496,1130,1131],{"class":505},"stop",[496,1133,911],{"class":595},[496,1135,651],{"class":595},[496,1137,1139,1141,1144,1146,1148,1151],{"class":498,"line":1138},15,[496,1140,998],{"class":595},[496,1142,1143],{"class":502},"msToFirstChunk",[496,1145,911],{"class":595},[496,1147,639],{"class":595},[496,1149,1150],{"class":957}," 234",[496,1152,651],{"class":595},[496,1154,1156,1158,1161,1163,1165,1168],{"class":498,"line":1155},16,[496,1157,998],{"class":595},[496,1159,1160],{"class":502},"msToFinish",[496,1162,911],{"class":595},[496,1164,639],{"class":595},[496,1166,1167],{"class":957}," 4500",[496,1169,651],{"class":595},[496,1171,1173,1175,1178,1180,1182],{"class":498,"line":1172},17,[496,1174,998],{"class":595},[496,1176,1177],{"class":502},"tokensPerSecond",[496,1179,911],{"class":595},[496,1181,639],{"class":595},[496,1183,1184],{"class":957}," 180\n",[496,1186,1188],{"class":498,"line":1187},18,[496,1189,1190],{"class":595},"  }\n",[496,1192,1194],{"class":498,"line":1193},19,[496,1195,1196],{"class":595},"}\n",[475,1198,1200],{"id":1199},"how-it-works","How It Works",[414,1202,1203,1206,1207,1210],{},[417,1204,1205],{},"createAILogger(log, options?)"," returns an ",[417,1208,1209],{},"AILogger"," with the following methods:",[1212,1213,1214,1227],"table",{},[1215,1216,1217],"thead",{},[1218,1219,1220,1224],"tr",{},[1221,1222,1223],"th",{},"Method",[1221,1225,1226],{},"Description",[1228,1229,1230,1260,1278,1291,1305],"tbody",{},[1218,1231,1232,1238],{},[1233,1234,1235],"td",{},[417,1236,1237],{},"wrap(model)",[1233,1239,1240,1241,1244,1245,1248,1249,1252,1253,1256,1257,679],{},"Wraps a language model with middleware. Accepts a model string (e.g. ",[417,1242,1243],{},"'anthropic\u002Fclaude-sonnet-4.6'",") or a ",[417,1246,1247],{},"LanguageModelV3"," object. Works with ",[417,1250,1251],{},"generateText",", ",[417,1254,1255],{},"streamText",", and ",[417,1258,1259],{},"ToolLoopAgent",[1218,1261,1262,1267],{},[1233,1263,1264],{},[417,1265,1266],{},"captureEmbed(result)",[1233,1268,1269,1270,1273,1274,1277],{},"Manually captures token usage, model info, and dimensions from ",[417,1271,1272],{},"embed()"," or ",[417,1275,1276],{},"embedMany()"," results.",[1218,1279,1280,1285],{},[1233,1281,1282],{},[417,1283,1284],{},"getMetadata()",[1233,1286,1287,1288,679],{},"Returns a snapshot of the current execution metadata. See ",[464,1289,1290],{"href":91},"Access Metadata",[1218,1292,1293,1298],{},[1233,1294,1295],{},[417,1296,1297],{},"getEstimatedCost()",[1233,1299,1300,1301,1304],{},"Returns the current estimated cost in dollars when a ",[417,1302,1303],{},"cost"," map is configured.",[1218,1306,1307,1312],{},[1233,1308,1309],{},[417,1310,1311],{},"onUpdate(callback)",[1233,1313,1314],{},"Subscribe to metadata updates. Fires on every step, embed, error, and integration finish.",[414,1316,1317],{},"The middleware intercepts calls at the provider level. It does not touch your callbacks, prompts, or responses. Captured data flows through the normal evlog pipeline (sampling, enrichers, drains) and lands in Axiom, Better Stack, or wherever you drain to.",[475,1319,1321],{"id":1320},"where-to-next","Where to next",[1323,1324,1325,1334,1337,1343],"card-group",{},[1326,1327,1329,1252,1331,1333],"card",{"icon":83,"title":1328,"to":81},"Usage Patterns",[417,1330,1255],{},[417,1332,1251],{},", multi-step agents, RAG, multiple models — every common pattern, ready to copy.",[1326,1335,1336],{"icon":88,"title":85,"to":86},"Capture tool inputs (with redaction and truncation), enable cost estimation, and handle errors.",[1326,1338,1339,1340,1342],{"icon":93,"title":1290,"to":91},"Read the captured ",[417,1341,987],{}," data inside your handler — persist it, bill against it, or stream it to the client.",[1326,1344,1346,1347,1350],{"icon":98,"title":1345,"to":96},"Deeper Telemetry","Add tool execution timing and total wall time with ",[417,1348,1349],{},"createEvlogIntegration",". Compose with other middlewares.",[475,1352,1354],{"id":1353},"works-with-all-frameworks","Works With All Frameworks",[414,1356,1357,1359],{},[417,1358,419],{}," works with any framework that evlog supports:",[483,1361,1362,1437,1554,1647,1743,1832,1902],{},[486,1363,1365],{"className":566,"code":1364,"filename":211,"language":569,"meta":492,"style":492},"import { useLogger } from 'evlog'\nimport { createAILogger } from 'evlog\u002Fai'\n\nconst log = useLogger(event)\nconst ai = createAILogger(log)\n",[417,1366,1367,1385,1403,1407,1423],{"__ignoreMap":492},[496,1368,1369,1371,1373,1375,1377,1379,1381,1383],{"class":498,"line":499},[496,1370,704],{"class":576},[496,1372,707],{"class":595},[496,1374,710],{"class":587},[496,1376,713],{"class":595},[496,1378,716],{"class":576},[496,1380,642],{"class":595},[496,1382,721],{"class":505},[496,1384,724],{"class":595},[496,1386,1387,1389,1391,1393,1395,1397,1399,1401],{"class":498,"line":612},[496,1388,704],{"class":576},[496,1390,707],{"class":595},[496,1392,733],{"class":587},[496,1394,713],{"class":595},[496,1396,716],{"class":576},[496,1398,642],{"class":595},[496,1400,419],{"class":505},[496,1402,724],{"class":595},[496,1404,1405],{"class":498,"line":633},[496,1406,749],{"emptyLinePlaceholder":748},[496,1408,1409,1412,1415,1418,1420],{"class":498,"line":654},[496,1410,1411],{"class":591},"const",[496,1413,1414],{"class":587}," log ",[496,1416,1417],{"class":595},"=",[496,1419,710],{"class":583},[496,1421,1422],{"class":587},"(event)\n",[496,1424,1425,1427,1430,1432,1434],{"class":498,"line":662},[496,1426,1411],{"class":591},[496,1428,1429],{"class":587}," ai ",[496,1431,1417],{"class":595},[496,1433,733],{"class":583},[496,1435,1436],{"class":587},"(log)\n",[486,1438,1440],{"className":566,"code":1439,"filename":216,"language":569,"meta":492,"style":492},"import { withEvlog, useLogger } from '@\u002Flib\u002Fevlog'\nimport { createAILogger } from 'evlog\u002Fai'\n\nexport const POST = withEvlog(async () => {\n  const log = useLogger()\n  const ai = createAILogger(log)\n  \u002F\u002F ...\n})\n",[417,1441,1442,1467,1485,1489,1514,1526,1542,1548],{"__ignoreMap":492},[496,1443,1444,1446,1448,1451,1454,1456,1458,1460,1462,1465],{"class":498,"line":499},[496,1445,704],{"class":576},[496,1447,707],{"class":595},[496,1449,1450],{"class":587}," withEvlog",[496,1452,1453],{"class":595},",",[496,1455,710],{"class":587},[496,1457,713],{"class":595},[496,1459,716],{"class":576},[496,1461,642],{"class":595},[496,1463,1464],{"class":505},"@\u002Flib\u002Fevlog",[496,1466,724],{"class":595},[496,1468,1469,1471,1473,1475,1477,1479,1481,1483],{"class":498,"line":612},[496,1470,704],{"class":576},[496,1472,707],{"class":595},[496,1474,733],{"class":587},[496,1476,713],{"class":595},[496,1478,716],{"class":576},[496,1480,642],{"class":595},[496,1482,419],{"class":505},[496,1484,724],{"class":595},[496,1486,1487],{"class":498,"line":633},[496,1488,749],{"emptyLinePlaceholder":748},[496,1490,1491,1493,1496,1499,1501,1503,1505,1507,1510,1512],{"class":498,"line":654},[496,1492,577],{"class":576},[496,1494,1495],{"class":591}," const",[496,1497,1498],{"class":587}," POST ",[496,1500,1417],{"class":595},[496,1502,1450],{"class":583},[496,1504,588],{"class":587},[496,1506,592],{"class":591},[496,1508,1509],{"class":595}," ()",[496,1511,606],{"class":591},[496,1513,609],{"class":595},[496,1515,1516,1518,1520,1522,1524],{"class":498,"line":662},[496,1517,615],{"class":591},[496,1519,778],{"class":587},[496,1521,621],{"class":595},[496,1523,710],{"class":583},[496,1525,685],{"class":627},[496,1527,1528,1530,1532,1534,1536,1538,1540],{"class":498,"line":671},[496,1529,615],{"class":591},[496,1531,795],{"class":587},[496,1533,621],{"class":595},[496,1535,733],{"class":583},[496,1537,588],{"class":627},[496,1539,804],{"class":587},[496,1541,668],{"class":627},[496,1543,1544],{"class":498,"line":688},[496,1545,1547],{"class":1546},"sHwdD","  \u002F\u002F ...\n",[496,1549,1550,1552],{"class":498,"line":813},[496,1551,691],{"class":595},[496,1553,668],{"class":587},[486,1555,1557],{"className":566,"code":1556,"filename":241,"language":569,"meta":492,"style":492},"import { createAILogger } from 'evlog\u002Fai'\n\napp.post('\u002Fapi\u002Fchat', (req, res) => {\n  const ai = createAILogger(req.log)\n  \u002F\u002F ...\n})\n",[417,1558,1559,1577,1581,1617,1637,1641],{"__ignoreMap":492},[496,1560,1561,1563,1565,1567,1569,1571,1573,1575],{"class":498,"line":499},[496,1562,704],{"class":576},[496,1564,707],{"class":595},[496,1566,733],{"class":587},[496,1568,713],{"class":595},[496,1570,716],{"class":576},[496,1572,642],{"class":595},[496,1574,419],{"class":505},[496,1576,724],{"class":595},[496,1578,1579],{"class":498,"line":612},[496,1580,749],{"emptyLinePlaceholder":748},[496,1582,1583,1586,1588,1591,1593,1595,1597,1599,1601,1603,1606,1608,1611,1613,1615],{"class":498,"line":633},[496,1584,1585],{"class":587},"app",[496,1587,679],{"class":595},[496,1589,1590],{"class":583},"post",[496,1592,588],{"class":587},[496,1594,648],{"class":595},[496,1596,939],{"class":505},[496,1598,648],{"class":595},[496,1600,1453],{"class":595},[496,1602,596],{"class":595},[496,1604,1605],{"class":599},"req",[496,1607,1453],{"class":595},[496,1609,1610],{"class":599}," res",[496,1612,603],{"class":595},[496,1614,606],{"class":591},[496,1616,609],{"class":595},[496,1618,1619,1621,1623,1625,1627,1629,1631,1633,1635],{"class":498,"line":654},[496,1620,615],{"class":591},[496,1622,795],{"class":587},[496,1624,621],{"class":595},[496,1626,733],{"class":583},[496,1628,588],{"class":627},[496,1630,1605],{"class":587},[496,1632,679],{"class":595},[496,1634,804],{"class":587},[496,1636,668],{"class":627},[496,1638,1639],{"class":498,"line":662},[496,1640,1547],{"class":1546},[496,1642,1643,1645],{"class":498,"line":671},[496,1644,691],{"class":595},[496,1646,668],{"class":587},[486,1648,1650],{"className":566,"code":1649,"filename":246,"language":569,"meta":492,"style":492},"import { createAILogger } from 'evlog\u002Fai'\n\napp.post('\u002Fapi\u002Fchat', (c) => {\n  const ai = createAILogger(c.get('log'))\n  \u002F\u002F ...\n})\n",[417,1651,1652,1670,1674,1703,1733,1737],{"__ignoreMap":492},[496,1653,1654,1656,1658,1660,1662,1664,1666,1668],{"class":498,"line":499},[496,1655,704],{"class":576},[496,1657,707],{"class":595},[496,1659,733],{"class":587},[496,1661,713],{"class":595},[496,1663,716],{"class":576},[496,1665,642],{"class":595},[496,1667,419],{"class":505},[496,1669,724],{"class":595},[496,1671,1672],{"class":498,"line":612},[496,1673,749],{"emptyLinePlaceholder":748},[496,1675,1676,1678,1680,1682,1684,1686,1688,1690,1692,1694,1697,1699,1701],{"class":498,"line":633},[496,1677,1585],{"class":587},[496,1679,679],{"class":595},[496,1681,1590],{"class":583},[496,1683,588],{"class":587},[496,1685,648],{"class":595},[496,1687,939],{"class":505},[496,1689,648],{"class":595},[496,1691,1453],{"class":595},[496,1693,596],{"class":595},[496,1695,1696],{"class":599},"c",[496,1698,603],{"class":595},[496,1700,606],{"class":591},[496,1702,609],{"class":595},[496,1704,1705,1707,1709,1711,1713,1715,1717,1719,1722,1724,1726,1728,1730],{"class":498,"line":654},[496,1706,615],{"class":591},[496,1708,795],{"class":587},[496,1710,621],{"class":595},[496,1712,733],{"class":583},[496,1714,588],{"class":627},[496,1716,1696],{"class":587},[496,1718,679],{"class":595},[496,1720,1721],{"class":583},"get",[496,1723,588],{"class":627},[496,1725,648],{"class":595},[496,1727,804],{"class":505},[496,1729,648],{"class":595},[496,1731,1732],{"class":627},"))\n",[496,1734,1735],{"class":498,"line":662},[496,1736,1547],{"class":1546},[496,1738,1739,1741],{"class":498,"line":671},[496,1740,691],{"class":595},[496,1742,668],{"class":587},[486,1744,1746],{"className":566,"code":1745,"filename":251,"language":569,"meta":492,"style":492},"import { createAILogger } from 'evlog\u002Fai'\n\napp.post('\u002Fapi\u002Fchat', async (request) => {\n  const ai = createAILogger(request.log)\n  \u002F\u002F ...\n})\n",[417,1747,1748,1766,1770,1802,1822,1826],{"__ignoreMap":492},[496,1749,1750,1752,1754,1756,1758,1760,1762,1764],{"class":498,"line":499},[496,1751,704],{"class":576},[496,1753,707],{"class":595},[496,1755,733],{"class":587},[496,1757,713],{"class":595},[496,1759,716],{"class":576},[496,1761,642],{"class":595},[496,1763,419],{"class":505},[496,1765,724],{"class":595},[496,1767,1768],{"class":498,"line":612},[496,1769,749],{"emptyLinePlaceholder":748},[496,1771,1772,1774,1776,1778,1780,1782,1784,1786,1788,1791,1793,1796,1798,1800],{"class":498,"line":633},[496,1773,1585],{"class":587},[496,1775,679],{"class":595},[496,1777,1590],{"class":583},[496,1779,588],{"class":587},[496,1781,648],{"class":595},[496,1783,939],{"class":505},[496,1785,648],{"class":595},[496,1787,1453],{"class":595},[496,1789,1790],{"class":591}," async",[496,1792,596],{"class":595},[496,1794,1795],{"class":599},"request",[496,1797,603],{"class":595},[496,1799,606],{"class":591},[496,1801,609],{"class":595},[496,1803,1804,1806,1808,1810,1812,1814,1816,1818,1820],{"class":498,"line":654},[496,1805,615],{"class":591},[496,1807,795],{"class":587},[496,1809,621],{"class":595},[496,1811,733],{"class":583},[496,1813,588],{"class":627},[496,1815,1795],{"class":587},[496,1817,679],{"class":595},[496,1819,804],{"class":587},[496,1821,668],{"class":627},[496,1823,1824],{"class":498,"line":662},[496,1825,1547],{"class":1546},[496,1827,1828,1830],{"class":498,"line":671},[496,1829,691],{"class":595},[496,1831,668],{"class":587},[486,1833,1835],{"className":566,"code":1834,"filename":236,"language":569,"meta":492,"style":492},"import { useLogger } from 'evlog\u002Fnestjs'\nimport { createAILogger } from 'evlog\u002Fai'\n\nconst log = useLogger()\nconst ai = createAILogger(log)\n",[417,1836,1837,1856,1874,1878,1890],{"__ignoreMap":492},[496,1838,1839,1841,1843,1845,1847,1849,1851,1854],{"class":498,"line":499},[496,1840,704],{"class":576},[496,1842,707],{"class":595},[496,1844,710],{"class":587},[496,1846,713],{"class":595},[496,1848,716],{"class":576},[496,1850,642],{"class":595},[496,1852,1853],{"class":505},"evlog\u002Fnestjs",[496,1855,724],{"class":595},[496,1857,1858,1860,1862,1864,1866,1868,1870,1872],{"class":498,"line":612},[496,1859,704],{"class":576},[496,1861,707],{"class":595},[496,1863,733],{"class":587},[496,1865,713],{"class":595},[496,1867,716],{"class":576},[496,1869,642],{"class":595},[496,1871,419],{"class":505},[496,1873,724],{"class":595},[496,1875,1876],{"class":498,"line":633},[496,1877,749],{"emptyLinePlaceholder":748},[496,1879,1880,1882,1884,1886,1888],{"class":498,"line":654},[496,1881,1411],{"class":591},[496,1883,1414],{"class":587},[496,1885,1417],{"class":595},[496,1887,710],{"class":583},[496,1889,685],{"class":587},[496,1891,1892,1894,1896,1898,1900],{"class":498,"line":662},[496,1893,1411],{"class":591},[496,1895,1429],{"class":587},[496,1897,1417],{"class":595},[496,1899,733],{"class":583},[496,1901,1436],{"class":587},[486,1903,1905],{"className":566,"code":1904,"filename":271,"language":569,"meta":492,"style":492},"import { createLogger } from 'evlog'\nimport { createAILogger } from 'evlog\u002Fai'\n\nconst log = createLogger()\nconst ai = createAILogger(log)\n\u002F\u002F ...\nlog.emit()\n",[417,1906,1907,1926,1944,1948,1960,1972,1977],{"__ignoreMap":492},[496,1908,1909,1911,1913,1916,1918,1920,1922,1924],{"class":498,"line":499},[496,1910,704],{"class":576},[496,1912,707],{"class":595},[496,1914,1915],{"class":587}," createLogger",[496,1917,713],{"class":595},[496,1919,716],{"class":576},[496,1921,642],{"class":595},[496,1923,721],{"class":505},[496,1925,724],{"class":595},[496,1927,1928,1930,1932,1934,1936,1938,1940,1942],{"class":498,"line":612},[496,1929,704],{"class":576},[496,1931,707],{"class":595},[496,1933,733],{"class":587},[496,1935,713],{"class":595},[496,1937,716],{"class":576},[496,1939,642],{"class":595},[496,1941,419],{"class":505},[496,1943,724],{"class":595},[496,1945,1946],{"class":498,"line":633},[496,1947,749],{"emptyLinePlaceholder":748},[496,1949,1950,1952,1954,1956,1958],{"class":498,"line":654},[496,1951,1411],{"class":591},[496,1953,1414],{"class":587},[496,1955,1417],{"class":595},[496,1957,1915],{"class":583},[496,1959,685],{"class":587},[496,1961,1962,1964,1966,1968,1970],{"class":498,"line":662},[496,1963,1411],{"class":591},[496,1965,1429],{"class":587},[496,1967,1417],{"class":595},[496,1969,733],{"class":583},[496,1971,1436],{"class":587},[496,1973,1974],{"class":498,"line":671},[496,1975,1976],{"class":1546},"\u002F\u002F ...\n",[496,1978,1979,1981,1983,1986],{"class":498,"line":688},[496,1980,804],{"class":587},[496,1982,679],{"class":595},[496,1984,1985],{"class":583},"emit",[496,1987,685],{"class":587},[1989,1990,1991],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":492,"searchDepth":612,"depth":612,"links":1993},[1994,1995,1996,1997,1998],{"id":477,"depth":612,"text":478},{"id":555,"depth":612,"text":20},{"id":1199,"depth":612,"text":1200},{"id":1320,"depth":612,"text":1321},{"id":1353,"depth":612,"text":1354},"Capture token usage, tool calls, model info, and streaming metrics from the Vercel AI SDK into wide events. Wrap your model and get full AI observability with one line.","md",[2002,2005,2006,2007],{"label":1328,"icon":83,"to":81,"color":2003,"variant":2004},"neutral","subtle",{"label":85,"icon":88,"to":86,"color":2003,"variant":2004},{"label":1290,"icon":93,"to":91,"color":2003,"variant":2004},{"label":1345,"icon":98,"to":96,"color":2003,"variant":2004},{},{"title":41,"icon":44},{"title":409,"description":1999},"qRB8V2kcS_znkY5Wd2I0zKuwg-V3hnV-lco0opAS6ZA",[2013,2015],{"title":66,"path":67,"stem":68,"description":2014,"icon":69,"children":-1},"Capture browser events with structured logging. Same API as the server, with automatic console styling, user identity context, and optional server transport.",{"title":80,"path":81,"stem":82,"description":2016,"icon":83,"children":-1},"streamText, generateText, multi-step agents, RAG, and multiple models — every common AI SDK pattern wired into evlog.",1778327033879]