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