[{"data":1,"prerenderedAt":1253},["ShallowReactive",2],{"navigation_docs":3,"-logging-better-auth-performance":402,"-logging-better-auth-performance-surround":1248},[4,35,159,201,289,299,386],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",{"title":30,"path":31,"stem":32,"icon":33},"vs Other Loggers","\u002Fgetting-started\u002Fvs-other-loggers","1.getting-started\u002F5.vs-other-loggers","i-lucide-scale",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Logging","\u002Flogging","2.logging",[40,45,50,55,60,65,70,99,127],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Catalogs","\u002Flogging\u002Fcatalogs","2.logging\u002F4.catalogs","i-lucide-book-open",{"title":66,"path":67,"stem":68,"icon":69},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F5.client-logging","i-lucide-monitor",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":34},"AI SDK","i-simple-icons-vercel","\u002Flogging\u002Fai-sdk","2.logging\u002F6.ai-sdk",[76,79,84,89,94],{"title":41,"path":77,"stem":78,"icon":44},"\u002Flogging\u002Fai-sdk\u002Foverview","2.logging\u002F6.ai-sdk\u002F01.overview",{"title":80,"path":81,"stem":82,"icon":83},"Usage","\u002Flogging\u002Fai-sdk\u002Fusage","2.logging\u002F6.ai-sdk\u002F02.usage","i-lucide-code",{"title":85,"path":86,"stem":87,"icon":88},"Options","\u002Flogging\u002Fai-sdk\u002Foptions","2.logging\u002F6.ai-sdk\u002F03.options","i-lucide-sliders",{"title":90,"path":91,"stem":92,"icon":93},"Metadata","\u002Flogging\u002Fai-sdk\u002Fmetadata","2.logging\u002F6.ai-sdk\u002F04.metadata","i-lucide-database",{"title":95,"path":96,"stem":97,"icon":98},"Telemetry","\u002Flogging\u002Fai-sdk\u002Ftelemetry","2.logging\u002F6.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Flogging\u002Fbetter-auth","2.logging\u002F7.better-auth",[105,108,113,118,122],{"title":41,"path":106,"stem":107,"icon":44},"\u002Flogging\u002Fbetter-auth\u002Foverview","2.logging\u002F7.better-auth\u002F01.overview",{"title":109,"path":110,"stem":111,"icon":112},"Identify User","\u002Flogging\u002Fbetter-auth\u002Fidentify-user","2.logging\u002F7.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":114,"path":115,"stem":116,"icon":117},"Middleware","\u002Flogging\u002Fbetter-auth\u002Fmiddleware","2.logging\u002F7.better-auth\u002F03.middleware","i-lucide-shield",{"title":119,"path":120,"stem":121,"icon":69},"Client Sync","\u002Flogging\u002Fbetter-auth\u002Fclient-sync","2.logging\u002F7.better-auth\u002F04.client-sync",{"title":123,"path":124,"stem":125,"icon":126},"Performance","\u002Flogging\u002Fbetter-auth\u002Fperformance","2.logging\u002F7.better-auth\u002F05.performance","i-lucide-gauge",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":34},"Audit Logs","i-lucide-shield-check","\u002Flogging\u002Faudit","2.logging\u002F8.audit",[133,136,141,146,151,155],{"title":41,"path":134,"stem":135,"icon":44},"\u002Flogging\u002Faudit\u002Foverview","2.logging\u002F8.audit\u002F01.overview",{"title":137,"path":138,"stem":139,"icon":140},"Schema","\u002Flogging\u002Faudit\u002Fschema","2.logging\u002F8.audit\u002F02.schema","i-lucide-file-text",{"title":142,"path":143,"stem":144,"icon":145},"Recording","\u002Flogging\u002Faudit\u002Frecording","2.logging\u002F8.audit\u002F03.recording","i-lucide-pen-line",{"title":147,"path":148,"stem":149,"icon":150},"Drains","\u002Flogging\u002Faudit\u002Fpipeline","2.logging\u002F8.audit\u002F04.pipeline","i-lucide-link",{"title":152,"path":153,"stem":154,"icon":129},"Compliance","\u002Flogging\u002Faudit\u002Fcompliance","2.logging\u002F8.audit\u002F05.compliance",{"title":156,"path":157,"stem":158,"icon":64},"Recipes","\u002Flogging\u002Faudit\u002Frecipes","2.logging\u002F8.audit\u002F06.recipes",{"title":160,"path":161,"stem":162,"children":163,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[164,169,174,179,184,188,191,196],{"title":165,"path":166,"stem":167,"icon":168},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":170,"path":171,"stem":172,"icon":173},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":175,"path":176,"stem":177,"icon":178},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":180,"path":181,"stem":182,"icon":183},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":185,"path":186,"stem":187,"icon":129},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":123,"path":189,"stem":190,"icon":126},"\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance",{"title":192,"path":193,"stem":194,"icon":195},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":197,"path":198,"stem":199,"icon":200},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":202,"path":203,"stem":204,"children":205,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[206,210,215,220,225,230,235,240,245,250,255,260,265,270,274,279,284],{"title":41,"path":207,"stem":208,"icon":209},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":211,"path":212,"stem":213,"icon":214},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":216,"path":217,"stem":218,"icon":219},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":221,"path":222,"stem":223,"icon":224},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":226,"path":227,"stem":228,"icon":229},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":231,"path":232,"stem":233,"icon":234},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":236,"path":237,"stem":238,"icon":239},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":241,"path":242,"stem":243,"icon":244},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":246,"path":247,"stem":248,"icon":249},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":251,"path":252,"stem":253,"icon":254},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":256,"path":257,"stem":258,"icon":259},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":261,"path":262,"stem":263,"icon":264},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":266,"path":267,"stem":268,"icon":269},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":271,"path":272,"stem":273,"icon":183},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":275,"path":276,"stem":277,"icon":278},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":280,"path":281,"stem":282,"icon":283},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":285,"path":286,"stem":287,"icon":288},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":290,"path":291,"stem":292,"children":293,"page":34},"Build On Top","\u002Fbuild-on-top","5.build-on-top",[294],{"title":295,"path":296,"stem":297,"icon":298},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F4.fs-reader","i-lucide-folder-search",{"title":300,"path":301,"stem":302,"children":303,"page":34},"Adapters","\u002Fadapters","6.adapters",[304,307,347,362],{"title":41,"path":305,"stem":306,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":308,"path":309,"stem":310,"children":311,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[312,317,322,327,332,337,342],{"title":313,"path":314,"stem":315,"icon":316},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":318,"path":319,"stem":320,"icon":321},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":323,"path":324,"stem":325,"icon":326},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":328,"path":329,"stem":330,"icon":331},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":333,"path":334,"stem":335,"icon":336},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":338,"path":339,"stem":340,"icon":341},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":343,"path":344,"stem":345,"icon":346},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":348,"path":349,"stem":350,"children":351,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[352,357],{"title":353,"path":354,"stem":355,"icon":356},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":358,"path":359,"stem":360,"icon":361},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":363,"path":364,"stem":365,"children":366,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[367,372,377,381],{"title":368,"path":369,"stem":370,"icon":371},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":373,"path":374,"stem":375,"icon":376},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":378,"path":379,"stem":380,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":382,"path":383,"stem":384,"icon":385},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":387,"path":388,"stem":389,"children":390,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[391,394,398],{"title":41,"path":392,"stem":393,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":395,"path":396,"stem":397,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":399,"path":400,"stem":401,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":403,"title":404,"body":405,"description":1237,"extension":1238,"links":1239,"meta":1244,"navigation":1245,"path":124,"seo":1246,"stem":125,"__hash__":1247},"docs\u002F2.logging\u002F7.better-auth\u002F05.performance.md","Performance & Composition",{"type":406,"value":407,"toc":1231},"minimark",[408,420,425,523,532,536,575,582,586,600,613,793,801,805,818,1224,1227],[409,410,411,415,416,419],"p",{},[412,413,414],"code",{},"getSession()"," costs a database query on every request. The integration measures it for you and exposes the timing as ",[412,417,418],{},"auth.resolvedIn"," so you can spot regressions before users do.",[421,422,424],"h2",{"id":423},"watch-session-resolution-time","Watch session resolution time",[426,427,433],"pre",{"className":428,"code":429,"filename":430,"language":431,"meta":432,"style":432},"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","",[412,434,435,444,496,517],{"__ignoreMap":432},[436,437,440],"span",{"class":438,"line":439},"line",1,[436,441,443],{"class":442},"sMK4o","{\n",[436,445,447,450,454,457,460,463,466,470,472,474,478,481,483,486,488,490,493],{"class":438,"line":446},2,[436,448,449],{"class":442},"  \"",[436,451,453],{"class":452},"spNyl","auth",[436,455,456],{"class":442},"\"",[436,458,459],{"class":442},":",[436,461,462],{"class":442}," {",[436,464,465],{"class":442}," \"",[436,467,469],{"class":468},"sBMFI","resolvedIn",[436,471,456],{"class":442},[436,473,459],{"class":442},[436,475,477],{"class":476},"sbssI"," 245",[436,479,480],{"class":442},",",[436,482,465],{"class":442},[436,484,485],{"class":468},"identified",[436,487,456],{"class":442},[436,489,459],{"class":442},[436,491,492],{"class":442}," true",[436,494,495],{"class":442}," },\n",[436,497,499,501,504,506,508,510,514],{"class":438,"line":498},3,[436,500,449],{"class":442},[436,502,503],{"class":452},"duration",[436,505,456],{"class":442},[436,507,459],{"class":442},[436,509,465],{"class":442},[436,511,513],{"class":512},"sfazB","312ms",[436,515,516],{"class":442},"\"\n",[436,518,520],{"class":438,"line":519},4,[436,521,522],{"class":442},"}\n",[409,524,525,526,528,529,531],{},"When ",[412,527,418],{}," is high relative to ",[412,530,503],{},", your auth backend is the bottleneck.",[421,533,535],{"id":534},"tune-for-high-traffic","Tune for high traffic",[537,538,539,554,567],"ol",{},[540,541,542,553],"li",{},[543,544,545,546],"strong",{},"Enable ",[547,548,552],"a",{"href":549,"rel":550},"https:\u002F\u002Fwww.better-auth.com\u002Fdocs\u002Fguides\u002Foptimizing-for-performance#cookie-cache",[551],"nofollow","cookie caching"," in Better Auth so session lookups don't hit the database every time.",[540,555,556,562,563,566],{},[543,557,558,559],{},"Use ",[412,560,561],{},"exclude"," on ",[412,564,565],{},"createAuthMiddleware"," to skip public routes that don't need user context.",[540,568,569,574],{},[543,570,558,571],{},[412,572,573],{},"include"," to limit resolution to specific route patterns instead of the entire app.",[409,576,577,578,581],{},"A common P95 target after caching: ",[412,579,580],{},"auth.resolvedIn \u003C 5ms",".",[421,583,585],{"id":584},"standalone-nitro","Standalone Nitro",[409,587,588,591,592,595,596,599],{},[412,589,590],{},"createAuthIdentifier"," is a factory that creates a Nitro ",[412,593,594],{},"request"," hook. Designed for ",[543,597,598],{},"standalone Nitro"," apps where the evlog Nitro module handles hook ordering.",[601,602,603,604,606,607,609,610,612],"note",{},"For ",[543,605,211],{},", use ",[412,608,565],{}," in a server middleware instead — Nitro plugin hook ordering can cause the logger to not be available yet in the ",[412,611,594],{}," hook.",[426,614,619],{"className":615,"code":616,"filename":617,"language":618,"meta":432,"style":432},"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",[412,620,621,648,668,674,704,742,775,784],{"__ignoreMap":432},[436,622,623,627,629,633,636,639,642,645],{"class":438,"line":439},[436,624,626],{"class":625},"s7zQu","import",[436,628,462],{"class":442},[436,630,632],{"class":631},"sTEyZ"," createAuthIdentifier",[436,634,635],{"class":442}," }",[436,637,638],{"class":625}," from",[436,640,641],{"class":442}," '",[436,643,644],{"class":512},"evlog\u002Fbetter-auth",[436,646,647],{"class":442},"'\n",[436,649,650,652,654,657,659,661,663,666],{"class":438,"line":446},[436,651,626],{"class":625},[436,653,462],{"class":442},[436,655,656],{"class":631}," auth",[436,658,635],{"class":442},[436,660,638],{"class":625},[436,662,641],{"class":442},[436,664,665],{"class":512},".\u002Flib\u002Fauth",[436,667,647],{"class":442},[436,669,670],{"class":438,"line":498},[436,671,673],{"emptyLinePlaceholder":672},true,"\n",[436,675,676,679,682,686,689,691,695,698,701],{"class":438,"line":519},[436,677,678],{"class":625},"export",[436,680,681],{"class":625}," default",[436,683,685],{"class":684},"s2Zo4"," defineNitroPlugin",[436,687,688],{"class":631},"(",[436,690,688],{"class":442},[436,692,694],{"class":693},"sHdIc","nitroApp",[436,696,697],{"class":442},")",[436,699,700],{"class":452}," =>",[436,702,703],{"class":442}," {\n",[436,705,707,710,712,715,717,720,723,726,728,730,732,734,736,738,740],{"class":438,"line":706},5,[436,708,709],{"class":631},"  nitroApp",[436,711,581],{"class":442},[436,713,714],{"class":631},"hooks",[436,716,581],{"class":442},[436,718,719],{"class":684},"hook",[436,721,688],{"class":722},"swJcz",[436,724,725],{"class":442},"'",[436,727,594],{"class":512},[436,729,725],{"class":442},[436,731,480],{"class":442},[436,733,632],{"class":684},[436,735,688],{"class":722},[436,737,453],{"class":631},[436,739,480],{"class":442},[436,741,703],{"class":442},[436,743,745,748,750,753,755,758,760,762,764,767,769,772],{"class":438,"line":744},6,[436,746,747],{"class":722},"    exclude",[436,749,459],{"class":442},[436,751,752],{"class":722}," [",[436,754,725],{"class":442},[436,756,757],{"class":512},"\u002Fapi\u002Fauth\u002F**",[436,759,725],{"class":442},[436,761,480],{"class":442},[436,763,641],{"class":442},[436,765,766],{"class":512},"\u002Fapi\u002Fpublic\u002F**",[436,768,725],{"class":442},[436,770,771],{"class":722},"]",[436,773,774],{"class":442},",\n",[436,776,778,781],{"class":438,"line":777},7,[436,779,780],{"class":442},"  }",[436,782,783],{"class":722},"))\n",[436,785,787,790],{"class":438,"line":786},8,[436,788,789],{"class":442},"}",[436,791,792],{"class":631},")\n",[409,794,795,796,581],{},"It accepts the same options as ",[547,797,799],{"href":798},"\u002Flogging\u002Fbetter-auth\u002Fmiddleware#options",[412,800,565],{},[421,802,804],{"id":803},"combine-with-the-ai-sdk","Combine with the AI SDK",[409,806,807,808,813,814,817],{},"When you also use ",[547,809,810],{"href":77},[412,811,812],{},"evlog\u002Fai",", your wide events include both user identity ",[543,815,816],{},"and"," AI metrics in a single event:",[426,819,822],{"className":428,"code":820,"filename":821,"language":431,"meta":432,"style":432},"{\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",[412,823,824,828,848,868,884,903,923,936,956,977,996,1002,1040,1054,1071,1092,1113,1130,1147,1164,1181,1198,1213,1219],{"__ignoreMap":432},[436,825,826],{"class":438,"line":439},[436,827,443],{"class":442},[436,829,830,832,835,837,839,841,844,846],{"class":438,"line":446},[436,831,449],{"class":442},[436,833,834],{"class":452},"method",[436,836,456],{"class":442},[436,838,459],{"class":442},[436,840,465],{"class":442},[436,842,843],{"class":512},"POST",[436,845,456],{"class":442},[436,847,774],{"class":442},[436,849,850,852,855,857,859,861,864,866],{"class":438,"line":498},[436,851,449],{"class":442},[436,853,854],{"class":452},"path",[436,856,456],{"class":442},[436,858,459],{"class":442},[436,860,465],{"class":442},[436,862,863],{"class":512},"\u002Fapi\u002Fchat",[436,865,456],{"class":442},[436,867,774],{"class":442},[436,869,870,872,875,877,879,882],{"class":438,"line":519},[436,871,449],{"class":442},[436,873,874],{"class":452},"status",[436,876,456],{"class":442},[436,878,459],{"class":442},[436,880,881],{"class":476}," 200",[436,883,774],{"class":442},[436,885,886,888,890,892,894,896,899,901],{"class":438,"line":706},[436,887,449],{"class":442},[436,889,503],{"class":452},[436,891,456],{"class":442},[436,893,459],{"class":442},[436,895,465],{"class":442},[436,897,898],{"class":512},"4.5s",[436,900,456],{"class":442},[436,902,774],{"class":442},[436,904,905,907,910,912,914,916,919,921],{"class":438,"line":744},[436,906,449],{"class":442},[436,908,909],{"class":452},"userId",[436,911,456],{"class":442},[436,913,459],{"class":442},[436,915,465],{"class":442},[436,917,918],{"class":512},"QBX9tPjJQExWawAbNll75",[436,920,456],{"class":442},[436,922,774],{"class":442},[436,924,925,927,930,932,934],{"class":438,"line":777},[436,926,449],{"class":442},[436,928,929],{"class":452},"user",[436,931,456],{"class":442},[436,933,459],{"class":442},[436,935,703],{"class":442},[436,937,938,941,944,946,948,950,952,954],{"class":438,"line":786},[436,939,940],{"class":442},"    \"",[436,942,943],{"class":468},"id",[436,945,456],{"class":442},[436,947,459],{"class":442},[436,949,465],{"class":442},[436,951,918],{"class":512},[436,953,456],{"class":442},[436,955,774],{"class":442},[436,957,959,961,964,966,968,970,973,975],{"class":438,"line":958},9,[436,960,940],{"class":442},[436,962,963],{"class":468},"name",[436,965,456],{"class":442},[436,967,459],{"class":442},[436,969,465],{"class":442},[436,971,972],{"class":512},"Hugo Richard",[436,974,456],{"class":442},[436,976,774],{"class":442},[436,978,980,982,985,987,989,991,994],{"class":438,"line":979},10,[436,981,940],{"class":442},[436,983,984],{"class":468},"email",[436,986,456],{"class":442},[436,988,459],{"class":442},[436,990,465],{"class":442},[436,992,993],{"class":512},"hugo@example.com",[436,995,516],{"class":442},[436,997,999],{"class":438,"line":998},11,[436,1000,1001],{"class":442},"  },\n",[436,1003,1005,1007,1009,1011,1013,1015,1017,1019,1021,1023,1026,1028,1030,1032,1034,1036,1038],{"class":438,"line":1004},12,[436,1006,449],{"class":442},[436,1008,453],{"class":452},[436,1010,456],{"class":442},[436,1012,459],{"class":442},[436,1014,462],{"class":442},[436,1016,465],{"class":442},[436,1018,469],{"class":468},[436,1020,456],{"class":442},[436,1022,459],{"class":442},[436,1024,1025],{"class":476}," 8",[436,1027,480],{"class":442},[436,1029,465],{"class":442},[436,1031,485],{"class":468},[436,1033,456],{"class":442},[436,1035,459],{"class":442},[436,1037,492],{"class":442},[436,1039,495],{"class":442},[436,1041,1043,1045,1048,1050,1052],{"class":438,"line":1042},13,[436,1044,449],{"class":442},[436,1046,1047],{"class":452},"ai",[436,1049,456],{"class":442},[436,1051,459],{"class":442},[436,1053,703],{"class":442},[436,1055,1057,1059,1062,1064,1066,1069],{"class":438,"line":1056},14,[436,1058,940],{"class":442},[436,1060,1061],{"class":468},"calls",[436,1063,456],{"class":442},[436,1065,459],{"class":442},[436,1067,1068],{"class":476}," 1",[436,1070,774],{"class":442},[436,1072,1074,1076,1079,1081,1083,1085,1088,1090],{"class":438,"line":1073},15,[436,1075,940],{"class":442},[436,1077,1078],{"class":468},"model",[436,1080,456],{"class":442},[436,1082,459],{"class":442},[436,1084,465],{"class":442},[436,1086,1087],{"class":512},"claude-sonnet-4.6",[436,1089,456],{"class":442},[436,1091,774],{"class":442},[436,1093,1095,1097,1100,1102,1104,1106,1109,1111],{"class":438,"line":1094},16,[436,1096,940],{"class":442},[436,1098,1099],{"class":468},"provider",[436,1101,456],{"class":442},[436,1103,459],{"class":442},[436,1105,465],{"class":442},[436,1107,1108],{"class":512},"anthropic",[436,1110,456],{"class":442},[436,1112,774],{"class":442},[436,1114,1116,1118,1121,1123,1125,1128],{"class":438,"line":1115},17,[436,1117,940],{"class":442},[436,1119,1120],{"class":468},"inputTokens",[436,1122,456],{"class":442},[436,1124,459],{"class":442},[436,1126,1127],{"class":476}," 3312",[436,1129,774],{"class":442},[436,1131,1133,1135,1138,1140,1142,1145],{"class":438,"line":1132},18,[436,1134,940],{"class":442},[436,1136,1137],{"class":468},"outputTokens",[436,1139,456],{"class":442},[436,1141,459],{"class":442},[436,1143,1144],{"class":476}," 814",[436,1146,774],{"class":442},[436,1148,1150,1152,1155,1157,1159,1162],{"class":438,"line":1149},19,[436,1151,940],{"class":442},[436,1153,1154],{"class":468},"totalTokens",[436,1156,456],{"class":442},[436,1158,459],{"class":442},[436,1160,1161],{"class":476}," 4126",[436,1163,774],{"class":442},[436,1165,1167,1169,1172,1174,1176,1179],{"class":438,"line":1166},20,[436,1168,940],{"class":442},[436,1170,1171],{"class":468},"msToFirstChunk",[436,1173,456],{"class":442},[436,1175,459],{"class":442},[436,1177,1178],{"class":476}," 234",[436,1180,774],{"class":442},[436,1182,1184,1186,1189,1191,1193,1196],{"class":438,"line":1183},21,[436,1185,940],{"class":442},[436,1187,1188],{"class":468},"msToFinish",[436,1190,456],{"class":442},[436,1192,459],{"class":442},[436,1194,1195],{"class":476}," 4500",[436,1197,774],{"class":442},[436,1199,1201,1203,1206,1208,1210],{"class":438,"line":1200},22,[436,1202,940],{"class":442},[436,1204,1205],{"class":468},"tokensPerSecond",[436,1207,456],{"class":442},[436,1209,459],{"class":442},[436,1211,1212],{"class":476}," 180\n",[436,1214,1216],{"class":438,"line":1215},23,[436,1217,1218],{"class":442},"  }\n",[436,1220,1222],{"class":438,"line":1221},24,[436,1223,522],{"class":442},[409,1225,1226],{},"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.",[1228,1229,1230],"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":432,"searchDepth":446,"depth":446,"links":1232},[1233,1234,1235,1236],{"id":423,"depth":446,"text":424},{"id":534,"depth":446,"text":535},{"id":584,"depth":446,"text":585},{"id":803,"depth":446,"text":804},"Watch session resolution time, enable session caching, wire the standalone Nitro hook, and combine with the AI SDK integration.","md",[1240,1243],{"label":114,"icon":117,"to":115,"color":1241,"variant":1242},"neutral","subtle",{"label":71,"icon":72,"to":77,"color":1241,"variant":1242},{},{"title":123,"icon":126},{"title":404,"description":1237},"TycRW-rrANbnFqA_aBYXwB7dnZSNK0JoDKrrmbQz6Z4",[1249,1251],{"title":119,"path":120,"stem":121,"description":1250,"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":1252,"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.",1778325969137]