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