[{"data":1,"prerenderedAt":1239},["ShallowReactive",2],{"navigation_docs":3,"-logging-better-auth-performance":388,"-logging-better-auth-performance-surround":1234},[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":1223,"extension":1224,"links":1225,"meta":1230,"navigation":1231,"path":119,"seo":1232,"stem":120,"__hash__":1233},"docs\u002F2.logging\u002F6.better-auth\u002F05.performance.md","Performance & Composition",{"type":392,"value":393,"toc":1217},"minimark",[394,406,411,509,518,522,561,568,572,586,599,779,787,791,804,1210,1213],[395,396,397,401,402,405],"p",{},[398,399,400],"code",{},"getSession()"," costs a database query on every request. The integration measures it for you and exposes the timing as ",[398,403,404],{},"auth.resolvedIn"," so you can spot regressions before users do.",[407,408,410],"h2",{"id":409},"watch-session-resolution-time","Watch session resolution time",[412,413,419],"pre",{"className":414,"code":415,"filename":416,"language":417,"meta":418,"style":418},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"auth\": { \"resolvedIn\": 245, \"identified\": true },\n  \"duration\": \"312ms\"\n}\n","Wide Event — slow session resolution","json","",[398,420,421,430,482,503],{"__ignoreMap":418},[422,423,426],"span",{"class":424,"line":425},"line",1,[422,427,429],{"class":428},"sMK4o","{\n",[422,431,433,436,440,443,446,449,452,456,458,460,464,467,469,472,474,476,479],{"class":424,"line":432},2,[422,434,435],{"class":428},"  \"",[422,437,439],{"class":438},"spNyl","auth",[422,441,442],{"class":428},"\"",[422,444,445],{"class":428},":",[422,447,448],{"class":428}," {",[422,450,451],{"class":428}," \"",[422,453,455],{"class":454},"sBMFI","resolvedIn",[422,457,442],{"class":428},[422,459,445],{"class":428},[422,461,463],{"class":462},"sbssI"," 245",[422,465,466],{"class":428},",",[422,468,451],{"class":428},[422,470,471],{"class":454},"identified",[422,473,442],{"class":428},[422,475,445],{"class":428},[422,477,478],{"class":428}," true",[422,480,481],{"class":428}," },\n",[422,483,485,487,490,492,494,496,500],{"class":424,"line":484},3,[422,486,435],{"class":428},[422,488,489],{"class":438},"duration",[422,491,442],{"class":428},[422,493,445],{"class":428},[422,495,451],{"class":428},[422,497,499],{"class":498},"sfazB","312ms",[422,501,502],{"class":428},"\"\n",[422,504,506],{"class":424,"line":505},4,[422,507,508],{"class":428},"}\n",[395,510,511,512,514,515,517],{},"When ",[398,513,404],{}," is high relative to ",[398,516,489],{},", your auth backend is the bottleneck.",[407,519,521],{"id":520},"tune-for-high-traffic","Tune for high traffic",[523,524,525,540,553],"ol",{},[526,527,528,539],"li",{},[529,530,531,532],"strong",{},"Enable ",[533,534,538],"a",{"href":535,"rel":536},"https:\u002F\u002Fwww.better-auth.com\u002Fdocs\u002Fguides\u002Foptimizing-for-performance#cookie-cache",[537],"nofollow","cookie caching"," in Better Auth so session lookups don't hit the database every time.",[526,541,542,548,549,552],{},[529,543,544,545],{},"Use ",[398,546,547],{},"exclude"," on ",[398,550,551],{},"createAuthMiddleware"," to skip public routes that don't need user context.",[526,554,555,560],{},[529,556,544,557],{},[398,558,559],{},"include"," to limit resolution to specific route patterns instead of the entire app.",[395,562,563,564,567],{},"A common P95 target after caching: ",[398,565,566],{},"auth.resolvedIn \u003C 5ms",".",[407,569,571],{"id":570},"standalone-nitro","Standalone Nitro",[395,573,574,577,578,581,582,585],{},[398,575,576],{},"createAuthIdentifier"," is a factory that creates a Nitro ",[398,579,580],{},"request"," hook. Designed for ",[529,583,584],{},"standalone Nitro"," apps where the evlog Nitro module handles hook ordering.",[587,588,589,590,592,593,595,596,598],"note",{},"For ",[529,591,207],{},", use ",[398,594,551],{}," in a server middleware instead — Nitro plugin hook ordering can cause the logger to not be available yet in the ",[398,597,580],{}," hook.",[412,600,605],{"className":601,"code":602,"filename":603,"language":604,"meta":418,"style":418},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createAuthIdentifier } from 'evlog\u002Fbetter-auth'\nimport { auth } from '.\u002Flib\u002Fauth'\n\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('request', createAuthIdentifier(auth, {\n    exclude: ['\u002Fapi\u002Fauth\u002F**', '\u002Fapi\u002Fpublic\u002F**'],\n  }))\n})\n","server\u002Fplugins\u002Fevlog-auth.ts","typescript",[398,606,607,634,654,660,690,728,761,770],{"__ignoreMap":418},[422,608,609,613,615,619,622,625,628,631],{"class":424,"line":425},[422,610,612],{"class":611},"s7zQu","import",[422,614,448],{"class":428},[422,616,618],{"class":617},"sTEyZ"," createAuthIdentifier",[422,620,621],{"class":428}," }",[422,623,624],{"class":611}," from",[422,626,627],{"class":428}," '",[422,629,630],{"class":498},"evlog\u002Fbetter-auth",[422,632,633],{"class":428},"'\n",[422,635,636,638,640,643,645,647,649,652],{"class":424,"line":432},[422,637,612],{"class":611},[422,639,448],{"class":428},[422,641,642],{"class":617}," auth",[422,644,621],{"class":428},[422,646,624],{"class":611},[422,648,627],{"class":428},[422,650,651],{"class":498},".\u002Flib\u002Fauth",[422,653,633],{"class":428},[422,655,656],{"class":424,"line":484},[422,657,659],{"emptyLinePlaceholder":658},true,"\n",[422,661,662,665,668,672,675,677,681,684,687],{"class":424,"line":505},[422,663,664],{"class":611},"export",[422,666,667],{"class":611}," default",[422,669,671],{"class":670},"s2Zo4"," defineNitroPlugin",[422,673,674],{"class":617},"(",[422,676,674],{"class":428},[422,678,680],{"class":679},"sHdIc","nitroApp",[422,682,683],{"class":428},")",[422,685,686],{"class":438}," =>",[422,688,689],{"class":428}," {\n",[422,691,693,696,698,701,703,706,709,712,714,716,718,720,722,724,726],{"class":424,"line":692},5,[422,694,695],{"class":617},"  nitroApp",[422,697,567],{"class":428},[422,699,700],{"class":617},"hooks",[422,702,567],{"class":428},[422,704,705],{"class":670},"hook",[422,707,674],{"class":708},"swJcz",[422,710,711],{"class":428},"'",[422,713,580],{"class":498},[422,715,711],{"class":428},[422,717,466],{"class":428},[422,719,618],{"class":670},[422,721,674],{"class":708},[422,723,439],{"class":617},[422,725,466],{"class":428},[422,727,689],{"class":428},[422,729,731,734,736,739,741,744,746,748,750,753,755,758],{"class":424,"line":730},6,[422,732,733],{"class":708},"    exclude",[422,735,445],{"class":428},[422,737,738],{"class":708}," [",[422,740,711],{"class":428},[422,742,743],{"class":498},"\u002Fapi\u002Fauth\u002F**",[422,745,711],{"class":428},[422,747,466],{"class":428},[422,749,627],{"class":428},[422,751,752],{"class":498},"\u002Fapi\u002Fpublic\u002F**",[422,754,711],{"class":428},[422,756,757],{"class":708},"]",[422,759,760],{"class":428},",\n",[422,762,764,767],{"class":424,"line":763},7,[422,765,766],{"class":428},"  }",[422,768,769],{"class":708},"))\n",[422,771,773,776],{"class":424,"line":772},8,[422,774,775],{"class":428},"}",[422,777,778],{"class":617},")\n",[395,780,781,782,567],{},"It accepts the same options as ",[533,783,785],{"href":784},"\u002Flogging\u002Fbetter-auth\u002Fmiddleware#options",[398,786,551],{},[407,788,790],{"id":789},"combine-with-the-ai-sdk","Combine with the AI SDK",[395,792,793,794,799,800,803],{},"When you also use ",[533,795,796],{"href":72},[398,797,798],{},"evlog\u002Fai",", your wide events include both user identity ",[529,801,802],{},"and"," AI metrics in a single event:",[412,805,808],{"className":414,"code":806,"filename":807,"language":417,"meta":418,"style":418},"{\n  \"method\": \"POST\",\n  \"path\": \"\u002Fapi\u002Fchat\",\n  \"status\": 200,\n  \"duration\": \"4.5s\",\n  \"userId\": \"QBX9tPjJQExWawAbNll75\",\n  \"user\": {\n    \"id\": \"QBX9tPjJQExWawAbNll75\",\n    \"name\": \"Hugo Richard\",\n    \"email\": \"hugo@example.com\"\n  },\n  \"auth\": { \"resolvedIn\": 8, \"identified\": true },\n  \"ai\": {\n    \"calls\": 1,\n    \"model\": \"claude-sonnet-4.6\",\n    \"provider\": \"anthropic\",\n    \"inputTokens\": 3312,\n    \"outputTokens\": 814,\n    \"totalTokens\": 4126,\n    \"msToFirstChunk\": 234,\n    \"msToFinish\": 4500,\n    \"tokensPerSecond\": 180\n  }\n}\n","Wide Event — AI + User",[398,809,810,814,834,854,870,889,909,922,942,963,982,988,1026,1040,1057,1078,1099,1116,1133,1150,1167,1184,1199,1205],{"__ignoreMap":418},[422,811,812],{"class":424,"line":425},[422,813,429],{"class":428},[422,815,816,818,821,823,825,827,830,832],{"class":424,"line":432},[422,817,435],{"class":428},[422,819,820],{"class":438},"method",[422,822,442],{"class":428},[422,824,445],{"class":428},[422,826,451],{"class":428},[422,828,829],{"class":498},"POST",[422,831,442],{"class":428},[422,833,760],{"class":428},[422,835,836,838,841,843,845,847,850,852],{"class":424,"line":484},[422,837,435],{"class":428},[422,839,840],{"class":438},"path",[422,842,442],{"class":428},[422,844,445],{"class":428},[422,846,451],{"class":428},[422,848,849],{"class":498},"\u002Fapi\u002Fchat",[422,851,442],{"class":428},[422,853,760],{"class":428},[422,855,856,858,861,863,865,868],{"class":424,"line":505},[422,857,435],{"class":428},[422,859,860],{"class":438},"status",[422,862,442],{"class":428},[422,864,445],{"class":428},[422,866,867],{"class":462}," 200",[422,869,760],{"class":428},[422,871,872,874,876,878,880,882,885,887],{"class":424,"line":692},[422,873,435],{"class":428},[422,875,489],{"class":438},[422,877,442],{"class":428},[422,879,445],{"class":428},[422,881,451],{"class":428},[422,883,884],{"class":498},"4.5s",[422,886,442],{"class":428},[422,888,760],{"class":428},[422,890,891,893,896,898,900,902,905,907],{"class":424,"line":730},[422,892,435],{"class":428},[422,894,895],{"class":438},"userId",[422,897,442],{"class":428},[422,899,445],{"class":428},[422,901,451],{"class":428},[422,903,904],{"class":498},"QBX9tPjJQExWawAbNll75",[422,906,442],{"class":428},[422,908,760],{"class":428},[422,910,911,913,916,918,920],{"class":424,"line":763},[422,912,435],{"class":428},[422,914,915],{"class":438},"user",[422,917,442],{"class":428},[422,919,445],{"class":428},[422,921,689],{"class":428},[422,923,924,927,930,932,934,936,938,940],{"class":424,"line":772},[422,925,926],{"class":428},"    \"",[422,928,929],{"class":454},"id",[422,931,442],{"class":428},[422,933,445],{"class":428},[422,935,451],{"class":428},[422,937,904],{"class":498},[422,939,442],{"class":428},[422,941,760],{"class":428},[422,943,945,947,950,952,954,956,959,961],{"class":424,"line":944},9,[422,946,926],{"class":428},[422,948,949],{"class":454},"name",[422,951,442],{"class":428},[422,953,445],{"class":428},[422,955,451],{"class":428},[422,957,958],{"class":498},"Hugo Richard",[422,960,442],{"class":428},[422,962,760],{"class":428},[422,964,966,968,971,973,975,977,980],{"class":424,"line":965},10,[422,967,926],{"class":428},[422,969,970],{"class":454},"email",[422,972,442],{"class":428},[422,974,445],{"class":428},[422,976,451],{"class":428},[422,978,979],{"class":498},"hugo@example.com",[422,981,502],{"class":428},[422,983,985],{"class":424,"line":984},11,[422,986,987],{"class":428},"  },\n",[422,989,991,993,995,997,999,1001,1003,1005,1007,1009,1012,1014,1016,1018,1020,1022,1024],{"class":424,"line":990},12,[422,992,435],{"class":428},[422,994,439],{"class":438},[422,996,442],{"class":428},[422,998,445],{"class":428},[422,1000,448],{"class":428},[422,1002,451],{"class":428},[422,1004,455],{"class":454},[422,1006,442],{"class":428},[422,1008,445],{"class":428},[422,1010,1011],{"class":462}," 8",[422,1013,466],{"class":428},[422,1015,451],{"class":428},[422,1017,471],{"class":454},[422,1019,442],{"class":428},[422,1021,445],{"class":428},[422,1023,478],{"class":428},[422,1025,481],{"class":428},[422,1027,1029,1031,1034,1036,1038],{"class":424,"line":1028},13,[422,1030,435],{"class":428},[422,1032,1033],{"class":438},"ai",[422,1035,442],{"class":428},[422,1037,445],{"class":428},[422,1039,689],{"class":428},[422,1041,1043,1045,1048,1050,1052,1055],{"class":424,"line":1042},14,[422,1044,926],{"class":428},[422,1046,1047],{"class":454},"calls",[422,1049,442],{"class":428},[422,1051,445],{"class":428},[422,1053,1054],{"class":462}," 1",[422,1056,760],{"class":428},[422,1058,1060,1062,1065,1067,1069,1071,1074,1076],{"class":424,"line":1059},15,[422,1061,926],{"class":428},[422,1063,1064],{"class":454},"model",[422,1066,442],{"class":428},[422,1068,445],{"class":428},[422,1070,451],{"class":428},[422,1072,1073],{"class":498},"claude-sonnet-4.6",[422,1075,442],{"class":428},[422,1077,760],{"class":428},[422,1079,1081,1083,1086,1088,1090,1092,1095,1097],{"class":424,"line":1080},16,[422,1082,926],{"class":428},[422,1084,1085],{"class":454},"provider",[422,1087,442],{"class":428},[422,1089,445],{"class":428},[422,1091,451],{"class":428},[422,1093,1094],{"class":498},"anthropic",[422,1096,442],{"class":428},[422,1098,760],{"class":428},[422,1100,1102,1104,1107,1109,1111,1114],{"class":424,"line":1101},17,[422,1103,926],{"class":428},[422,1105,1106],{"class":454},"inputTokens",[422,1108,442],{"class":428},[422,1110,445],{"class":428},[422,1112,1113],{"class":462}," 3312",[422,1115,760],{"class":428},[422,1117,1119,1121,1124,1126,1128,1131],{"class":424,"line":1118},18,[422,1120,926],{"class":428},[422,1122,1123],{"class":454},"outputTokens",[422,1125,442],{"class":428},[422,1127,445],{"class":428},[422,1129,1130],{"class":462}," 814",[422,1132,760],{"class":428},[422,1134,1136,1138,1141,1143,1145,1148],{"class":424,"line":1135},19,[422,1137,926],{"class":428},[422,1139,1140],{"class":454},"totalTokens",[422,1142,442],{"class":428},[422,1144,445],{"class":428},[422,1146,1147],{"class":462}," 4126",[422,1149,760],{"class":428},[422,1151,1153,1155,1158,1160,1162,1165],{"class":424,"line":1152},20,[422,1154,926],{"class":428},[422,1156,1157],{"class":454},"msToFirstChunk",[422,1159,442],{"class":428},[422,1161,445],{"class":428},[422,1163,1164],{"class":462}," 234",[422,1166,760],{"class":428},[422,1168,1170,1172,1175,1177,1179,1182],{"class":424,"line":1169},21,[422,1171,926],{"class":428},[422,1173,1174],{"class":454},"msToFinish",[422,1176,442],{"class":428},[422,1178,445],{"class":428},[422,1180,1181],{"class":462}," 4500",[422,1183,760],{"class":428},[422,1185,1187,1189,1192,1194,1196],{"class":424,"line":1186},22,[422,1188,926],{"class":428},[422,1190,1191],{"class":454},"tokensPerSecond",[422,1193,442],{"class":428},[422,1195,445],{"class":428},[422,1197,1198],{"class":462}," 180\n",[422,1200,1202],{"class":424,"line":1201},23,[422,1203,1204],{"class":428},"  }\n",[422,1206,1208],{"class":424,"line":1207},24,[422,1209,508],{"class":428},[395,1211,1212],{},"This is the power of wide events — one event per request, all context in one place: who made the request, what they did, how the AI responded, and how it performed.",[1214,1215,1216],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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}",{"title":418,"searchDepth":432,"depth":432,"links":1218},[1219,1220,1221,1222],{"id":409,"depth":432,"text":410},{"id":520,"depth":432,"text":521},{"id":570,"depth":432,"text":571},{"id":789,"depth":432,"text":790},"Watch session resolution time, enable session caching, wire the standalone Nitro hook, and combine with the AI SDK integration.","md",[1226,1229],{"label":109,"icon":112,"to":110,"color":1227,"variant":1228},"neutral","subtle",{"label":66,"icon":67,"to":72,"color":1227,"variant":1228},{},{"title":118,"icon":121},{"title":390,"description":1223},"hvZQrVYb0UTOGr6ZDIK7Usn-E0AFECQZ1CRdNkuIcl4",[1235,1237],{"title":114,"path":115,"stem":116,"description":1236,"icon":64,"children":-1},"Mirror the server-side user identity into client-side logs by watching the Better Auth session and calling setIdentity.",{"title":41,"path":129,"stem":130,"description":1238,"icon":44,"children":-1},"First-class audit logs as a thin layer on top of evlog's wide events. Add tamper-evident audit trails to any app with one enricher, one drain wrapper, and one helper.",1777911265879]