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