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