[{"data":1,"prerenderedAt":2201},["ShallowReactive",2],{"navigation_docs":3,"-frameworks-custom-integration":292,"-frameworks-custom-integration-surround":2196},[4,30,65,110,198,262,278],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24],{"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",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Logging","\u002Flogging","2.logging",[35,40,45,50,55,60],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":41,"path":42,"stem":43,"icon":44},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":46,"path":47,"stem":48,"icon":49},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":51,"path":52,"stem":53,"icon":54},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":56,"path":57,"stem":58,"icon":59},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F4.client-logging","i-lucide-monitor",{"title":61,"path":62,"stem":63,"icon":64},"AI SDK Integration","\u002Flogging\u002Fai-sdk","2.logging\u002F5.ai-sdk","i-simple-icons-vercel",{"title":66,"path":67,"stem":68,"children":69,"page":29},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[70,75,80,85,90,95,100,105],{"title":71,"path":72,"stem":73,"icon":74},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":76,"path":77,"stem":78,"icon":79},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":81,"path":82,"stem":83,"icon":84},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":86,"path":87,"stem":88,"icon":89},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":91,"path":92,"stem":93,"icon":94},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices","i-lucide-shield-check",{"title":96,"path":97,"stem":98,"icon":99},"Performance","\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance","i-lucide-gauge",{"title":101,"path":102,"stem":103,"icon":104},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":106,"path":107,"stem":108,"icon":109},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":111,"path":112,"stem":113,"children":114,"page":29},"Frameworks","\u002Fframeworks","4.frameworks",[115,119,124,129,134,139,144,149,154,159,164,169,174,179,183,188,193],{"title":36,"path":116,"stem":117,"icon":118},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":120,"path":121,"stem":122,"icon":123},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":125,"path":126,"stem":127,"icon":128},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":130,"path":131,"stem":132,"icon":133},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":135,"path":136,"stem":137,"icon":138},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":140,"path":141,"stem":142,"icon":143},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":145,"path":146,"stem":147,"icon":148},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":150,"path":151,"stem":152,"icon":153},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":155,"path":156,"stem":157,"icon":158},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":160,"path":161,"stem":162,"icon":163},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":165,"path":166,"stem":167,"icon":168},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":170,"path":171,"stem":172,"icon":173},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":175,"path":176,"stem":177,"icon":178},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":180,"path":181,"stem":182,"icon":89},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":184,"path":185,"stem":186,"icon":187},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":189,"path":190,"stem":191,"icon":192},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F15.custom-integration","i-lucide-puzzle",{"title":194,"path":195,"stem":196,"icon":197},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":199,"path":200,"stem":201,"children":202,"page":29},"Adapters","\u002Fadapters","5.adapters",[203,207,212,217,222,227,232,237,242,247,252,257],{"title":36,"path":204,"stem":205,"icon":206},"\u002Fadapters\u002Foverview","5.adapters\u002F1.overview","i-custom-plug",{"title":208,"path":209,"stem":210,"icon":211},"Custom Adapters","\u002Fadapters\u002Fcustom","5.adapters\u002F10.custom","i-lucide-code",{"title":213,"path":214,"stem":215,"icon":216},"Pipeline","\u002Fadapters\u002Fpipeline","5.adapters\u002F11.pipeline","i-lucide-workflow",{"title":218,"path":219,"stem":220,"icon":221},"HTTP","\u002Fadapters\u002Fhttp","5.adapters\u002F12.http","i-lucide-globe",{"title":223,"path":224,"stem":225,"icon":226},"Axiom","\u002Fadapters\u002Faxiom","5.adapters\u002F2.axiom","i-custom-axiom",{"title":228,"path":229,"stem":230,"icon":231},"OTLP","\u002Fadapters\u002Fotlp","5.adapters\u002F3.otlp","i-simple-icons-opentelemetry",{"title":233,"path":234,"stem":235,"icon":236},"PostHog","\u002Fadapters\u002Fposthog","5.adapters\u002F4.posthog","i-simple-icons-posthog",{"title":238,"path":239,"stem":240,"icon":241},"Sentry","\u002Fadapters\u002Fsentry","5.adapters\u002F5.sentry","i-simple-icons-sentry",{"title":243,"path":244,"stem":245,"icon":246},"Better Stack","\u002Fadapters\u002Fbetter-stack","5.adapters\u002F6.better-stack","i-simple-icons-betterstack",{"title":248,"path":249,"stem":250,"icon":251},"File System","\u002Fadapters\u002Ffs","5.adapters\u002F7.fs","i-lucide-hard-drive",{"title":253,"path":254,"stem":255,"icon":256},"Datadog","\u002Fadapters\u002Fdatadog","5.adapters\u002F8.datadog","i-simple-icons-datadog",{"title":258,"path":259,"stem":260,"icon":261},"HyperDX","\u002Fadapters\u002Fhyperdx","5.adapters\u002F9.hyperdx","i-custom-hyperdx",{"title":263,"path":264,"stem":265,"children":266,"page":29},"Enrichers","\u002Fenrichers","6.enrichers",[267,270,274],{"title":36,"path":268,"stem":269,"icon":28},"\u002Fenrichers\u002Foverview","6.enrichers\u002F1.overview",{"title":271,"path":272,"stem":273,"icon":192},"Built-in","\u002Fenrichers\u002Fbuilt-in","6.enrichers\u002F2.built-in",{"title":275,"path":276,"stem":277,"icon":211},"Custom","\u002Fenrichers\u002Fcustom","6.enrichers\u002F3.custom",{"title":279,"path":280,"stem":281,"children":282,"page":29},"NuxtHub","\u002Fnuxthub","7.nuxthub",[283,287],{"title":36,"path":284,"stem":285,"icon":286},"\u002Fnuxthub\u002Foverview","7.nuxthub\u002F1.overview","i-lucide-database",{"title":288,"path":289,"stem":290,"icon":291},"Retention","\u002Fnuxthub\u002Fretention","7.nuxthub\u002F2.retention","i-lucide-clock",{"id":293,"title":189,"body":294,"description":2189,"extension":2190,"links":2191,"meta":2192,"navigation":2193,"path":190,"seo":2194,"stem":191,"__hash__":2195},"docs\u002F4.frameworks\u002F15.custom-integration.md",{"type":295,"value":296,"toc":2179},"minimark",[297,306,317,322,379,383,563,587,591,594,602,672,678,682,685,1406,1413,1417,1522,1526,1529,2003,2007,2010,2127,2138,2142,2175],[298,299,300,301,305],"p",{},"Don't see your framework listed? The ",[302,303,304],"code",{},"evlog\u002Ftoolkit"," package exposes the same building blocks that power every built-in integration (Hono, Express, Fastify, Elysia, NestJS, SvelteKit). Build a full-featured evlog middleware for any HTTP framework in ~50 lines of code.",[307,308,311,312,316],"callout",{"color":309,"icon":310},"warning","i-lucide-flask-conical","The toolkit API is marked as ",[313,314,315],"strong",{},"beta",". The surface is stable (used by all built-in integrations) but may evolve based on community feedback.",[318,319,321],"h2",{"id":320},"install","Install",[323,324,325,350,365],"code-group",{},[326,327,333],"pre",{"className":328,"code":329,"filename":330,"language":331,"meta":332,"style":332},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add evlog\n","pnpm","bash","",[302,334,335],{"__ignoreMap":332},[336,337,340,343,347],"span",{"class":338,"line":339},"line",1,[336,341,330],{"class":342},"sBMFI",[336,344,346],{"class":345},"sfazB"," add",[336,348,349],{"class":345}," evlog\n",[326,351,354],{"className":328,"code":352,"filename":353,"language":331,"meta":332,"style":332},"npm install evlog\n","npm",[302,355,356],{"__ignoreMap":332},[336,357,358,360,363],{"class":338,"line":339},[336,359,353],{"class":342},[336,361,362],{"class":345}," install",[336,364,349],{"class":345},[326,366,369],{"className":328,"code":367,"filename":368,"language":331,"meta":332,"style":332},"bun add evlog\n","bun",[302,370,371],{"__ignoreMap":332},[336,372,373,375,377],{"class":338,"line":339},[336,374,368],{"class":342},[336,376,346],{"class":345},[336,378,349],{"class":345},[318,380,382],{"id":381},"whats-in-the-toolkit","What's in the Toolkit",[384,385,386,399],"table",{},[387,388,389],"thead",{},[390,391,392,396],"tr",{},[393,394,395],"th",{},"Export",[393,397,398],{},"Purpose",[400,401,402,413,442,467,480,494,508,525,543,553],"tbody",{},[390,403,404,410],{},[405,406,407],"td",{},[302,408,409],{},"createMiddlewareLogger(opts)",[405,411,412],{},"Full pipeline: logger creation, route filtering, tail sampling, emit, enrich, drain",[390,414,415,420],{},[405,416,417],{},[302,418,419],{},"BaseEvlogOptions",[405,421,422,423,426,427,426,430,426,433,426,436,426,439],{},"Base user-facing options type with ",[302,424,425],{},"drain",", ",[302,428,429],{},"enrich",[302,431,432],{},"keep",[302,434,435],{},"include",[302,437,438],{},"exclude",[302,440,441],{},"routes",[390,443,444,449],{},[405,445,446],{},[302,447,448],{},"MiddlewareLoggerOptions",[405,450,451,452,454,455,426,458,426,461,426,464],{},"Internal options extending ",[302,453,419],{}," with ",[302,456,457],{},"method",[302,459,460],{},"path",[302,462,463],{},"requestId",[302,465,466],{},"headers",[390,468,469,474],{},[405,470,471],{},[302,472,473],{},"MiddlewareLoggerResult",[405,475,476,477],{},"Return type: ",[302,478,479],{},"{ logger, finish, skipped }",[390,481,482,487],{},[405,483,484],{},[302,485,486],{},"extractSafeHeaders(headers)",[405,488,489,490,493],{},"Filter sensitive headers from a Web API ",[302,491,492],{},"Headers"," object (Hono, Elysia, Deno, Bun)",[390,495,496,501],{},[405,497,498],{},[302,499,500],{},"extractSafeNodeHeaders(headers)",[405,502,503,504,507],{},"Filter sensitive headers from Node.js ",[302,505,506],{},"IncomingHttpHeaders"," (Express, Fastify, NestJS)",[390,509,510,515],{},[405,511,512],{},[302,513,514],{},"createLoggerStorage(hint)",[405,516,517,518,521,522],{},"Factory returning ",[302,519,520],{},"{ storage, useLogger }"," backed by ",[302,523,524],{},"AsyncLocalStorage",[390,526,527,532],{},[405,528,529],{},[302,530,531],{},"extractErrorStatus(error)",[405,533,534,535,538,539,542],{},"Extract HTTP status from any error shape (",[302,536,537],{},"status"," or ",[302,540,541],{},"statusCode",")",[390,544,545,550],{},[405,546,547],{},[302,548,549],{},"shouldLog(path, include, exclude)",[405,551,552],{},"Route filtering logic (glob patterns)",[390,554,555,560],{},[405,556,557],{},[302,558,559],{},"getServiceForPath(path, routes)",[405,561,562],{},"Resolve per-route service name",[298,564,565,566,426,569,426,572,426,575,578,579,582,583,586],{},"Types like ",[302,567,568],{},"RequestLogger",[302,570,571],{},"DrainContext",[302,573,574],{},"EnrichContext",[302,576,577],{},"WideEvent",", and ",[302,580,581],{},"TailSamplingContext"," are exported from the main ",[302,584,585],{},"evlog"," package.",[318,588,590],{"id":589},"architecture","Architecture",[298,592,593],{},"Every evlog framework integration follows the same 5-step pattern:",[326,595,600],{"className":596,"code":598,"language":599},[597],"language-text","Request → createMiddlewareLogger() → store logger → handle request → finish()\n","text",[302,601,598],{"__ignoreMap":332},[603,604,605,621,630,643,660],"ol",{},[606,607,608,611,612,426,614,426,616,578,618,620],"li",{},[313,609,610],{},"Extract"," ",[302,613,457],{},[302,615,460],{},[302,617,463],{},[302,619,466],{}," from the framework request",[606,622,623,611,626,629],{},[313,624,625],{},"Call",[302,627,628],{},"createMiddlewareLogger()"," with those fields + user options",[606,631,632,611,635,638,639,642],{},[313,633,634],{},"Check",[302,636,637],{},"skipped"," - if ",[302,640,641],{},"true",", the route is filtered out, skip to next middleware",[606,644,645,648,649,652,653,426,656,659],{},[313,646,647],{},"Store"," the ",[302,650,651],{},"logger"," in the framework's idiomatic context (",[302,654,655],{},"req.log",[302,657,658],{},"c.set('log')",", etc.)",[606,661,662,611,664,667,668,671],{},[313,663,625],{},[302,665,666],{},"finish({ status })"," on success or ",[302,669,670],{},"finish({ error })"," on failure",[298,673,674,677],{},[302,675,676],{},"createMiddlewareLogger"," handles everything else: route filtering, service overrides, duration tracking, tail sampling, event emission, enrichment, and draining.",[318,679,681],{"id":680},"minimal-example","Minimal Example",[298,683,684],{},"Here's a complete integration for a generic Node.js HTTP framework:",[326,686,691],{"className":687,"code":688,"filename":689,"language":690,"meta":332,"style":332},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { RequestLogger } from 'evlog'\nimport {\n  createMiddlewareLogger,\n  extractSafeNodeHeaders,\n  createLoggerStorage,\n  type BaseEvlogOptions,\n} from 'evlog\u002Ftoolkit'\n\nexport type MyFrameworkEvlogOptions = BaseEvlogOptions\n\nconst { storage, useLogger } = createLoggerStorage(\n  'middleware context. Make sure evlog middleware is registered before your routes.',\n)\n\nexport { useLogger }\n\nexport function evlog(options: MyFrameworkEvlogOptions = {}) {\n  return async (req: IncomingMessage, res: ServerResponse, next: () => Promise\u003Cvoid>) => {\n    const { logger, finish, skipped } = createMiddlewareLogger({\n      method: req.method || 'GET',\n      path: req.url || '\u002F',\n      requestId: (req.headers['x-request-id'] as string) || crypto.randomUUID(),\n      headers: extractSafeNodeHeaders(req.headers),\n      ...options,\n    })\n\n    if (skipped) {\n      await next()\n      return\n    }\n\n    ;(req as IncomingMessage & { log: RequestLogger }).log = logger\n\n    try {\n      await storage.run(logger, () => next())\n      await finish({ status: res.statusCode })\n    } catch (error) {\n      await finish({ error: error as Error })\n      throw error\n    }\n  }\n}\n","my-framework-evlog.ts","typescript",[302,692,693,731,753,761,770,778,786,797,811,818,836,841,868,882,888,893,906,911,941,998,1032,1060,1086,1140,1163,1173,1181,1186,1200,1211,1217,1223,1228,1269,1274,1282,1309,1336,1353,1380,1389,1394,1400],{"__ignoreMap":332},[336,694,695,699,702,706,710,713,716,719,722,725,728],{"class":338,"line":339},[336,696,698],{"class":697},"s7zQu","import",[336,700,701],{"class":697}," type",[336,703,705],{"class":704},"sMK4o"," {",[336,707,709],{"class":708},"sTEyZ"," IncomingMessage",[336,711,712],{"class":704},",",[336,714,715],{"class":708}," ServerResponse",[336,717,718],{"class":704}," }",[336,720,721],{"class":697}," from",[336,723,724],{"class":704}," '",[336,726,727],{"class":345},"node:http",[336,729,730],{"class":704},"'\n",[336,732,734,736,738,740,743,745,747,749,751],{"class":338,"line":733},2,[336,735,698],{"class":697},[336,737,701],{"class":697},[336,739,705],{"class":704},[336,741,742],{"class":708}," RequestLogger",[336,744,718],{"class":704},[336,746,721],{"class":697},[336,748,724],{"class":704},[336,750,585],{"class":345},[336,752,730],{"class":704},[336,754,756,758],{"class":338,"line":755},3,[336,757,698],{"class":697},[336,759,760],{"class":704}," {\n",[336,762,764,767],{"class":338,"line":763},4,[336,765,766],{"class":708},"  createMiddlewareLogger",[336,768,769],{"class":704},",\n",[336,771,773,776],{"class":338,"line":772},5,[336,774,775],{"class":708},"  extractSafeNodeHeaders",[336,777,769],{"class":704},[336,779,781,784],{"class":338,"line":780},6,[336,782,783],{"class":708},"  createLoggerStorage",[336,785,769],{"class":704},[336,787,789,792,795],{"class":338,"line":788},7,[336,790,791],{"class":697},"  type",[336,793,794],{"class":708}," BaseEvlogOptions",[336,796,769],{"class":704},[336,798,800,803,805,807,809],{"class":338,"line":799},8,[336,801,802],{"class":704},"}",[336,804,721],{"class":697},[336,806,724],{"class":704},[336,808,304],{"class":345},[336,810,730],{"class":704},[336,812,814],{"class":338,"line":813},9,[336,815,817],{"emptyLinePlaceholder":816},true,"\n",[336,819,821,824,827,830,833],{"class":338,"line":820},10,[336,822,823],{"class":697},"export",[336,825,701],{"class":826},"spNyl",[336,828,829],{"class":342}," MyFrameworkEvlogOptions",[336,831,832],{"class":704}," =",[336,834,835],{"class":342}," BaseEvlogOptions\n",[336,837,839],{"class":338,"line":838},11,[336,840,817],{"emptyLinePlaceholder":816},[336,842,844,847,849,852,854,857,859,861,865],{"class":338,"line":843},12,[336,845,846],{"class":826},"const",[336,848,705],{"class":704},[336,850,851],{"class":708}," storage",[336,853,712],{"class":704},[336,855,856],{"class":708}," useLogger ",[336,858,802],{"class":704},[336,860,832],{"class":704},[336,862,864],{"class":863},"s2Zo4"," createLoggerStorage",[336,866,867],{"class":708},"(\n",[336,869,871,874,877,880],{"class":338,"line":870},13,[336,872,873],{"class":704},"  '",[336,875,876],{"class":345},"middleware context. Make sure evlog middleware is registered before your routes.",[336,878,879],{"class":704},"'",[336,881,769],{"class":704},[336,883,885],{"class":338,"line":884},14,[336,886,887],{"class":708},")\n",[336,889,891],{"class":338,"line":890},15,[336,892,817],{"emptyLinePlaceholder":816},[336,894,896,898,900,903],{"class":338,"line":895},16,[336,897,823],{"class":697},[336,899,705],{"class":704},[336,901,902],{"class":708}," useLogger",[336,904,905],{"class":704}," }\n",[336,907,909],{"class":338,"line":908},17,[336,910,817],{"emptyLinePlaceholder":816},[336,912,914,916,919,922,925,929,932,934,936,939],{"class":338,"line":913},18,[336,915,823],{"class":697},[336,917,918],{"class":826}," function",[336,920,921],{"class":863}," evlog",[336,923,924],{"class":704},"(",[336,926,928],{"class":927},"sHdIc","options",[336,930,931],{"class":704},":",[336,933,829],{"class":342},[336,935,832],{"class":704},[336,937,938],{"class":704}," {})",[336,940,760],{"class":704},[336,942,944,947,950,953,956,958,960,962,965,967,969,971,974,976,979,982,985,988,991,994,996],{"class":338,"line":943},19,[336,945,946],{"class":697},"  return",[336,948,949],{"class":826}," async",[336,951,952],{"class":704}," (",[336,954,955],{"class":927},"req",[336,957,931],{"class":704},[336,959,709],{"class":342},[336,961,712],{"class":704},[336,963,964],{"class":927}," res",[336,966,931],{"class":704},[336,968,715],{"class":342},[336,970,712],{"class":704},[336,972,973],{"class":863}," next",[336,975,931],{"class":704},[336,977,978],{"class":704}," ()",[336,980,981],{"class":826}," =>",[336,983,984],{"class":342}," Promise",[336,986,987],{"class":704},"\u003C",[336,989,990],{"class":342},"void",[336,992,993],{"class":704},">)",[336,995,981],{"class":826},[336,997,760],{"class":704},[336,999,1001,1004,1006,1009,1011,1014,1016,1019,1021,1023,1026,1029],{"class":338,"line":1000},20,[336,1002,1003],{"class":826},"    const",[336,1005,705],{"class":704},[336,1007,1008],{"class":708}," logger",[336,1010,712],{"class":704},[336,1012,1013],{"class":708}," finish",[336,1015,712],{"class":704},[336,1017,1018],{"class":708}," skipped",[336,1020,718],{"class":704},[336,1022,832],{"class":704},[336,1024,1025],{"class":863}," createMiddlewareLogger",[336,1027,924],{"class":1028},"swJcz",[336,1030,1031],{"class":704},"{\n",[336,1033,1035,1038,1040,1043,1046,1048,1051,1053,1056,1058],{"class":338,"line":1034},21,[336,1036,1037],{"class":1028},"      method",[336,1039,931],{"class":704},[336,1041,1042],{"class":708}," req",[336,1044,1045],{"class":704},".",[336,1047,457],{"class":708},[336,1049,1050],{"class":704}," ||",[336,1052,724],{"class":704},[336,1054,1055],{"class":345},"GET",[336,1057,879],{"class":704},[336,1059,769],{"class":704},[336,1061,1063,1066,1068,1070,1072,1075,1077,1079,1082,1084],{"class":338,"line":1062},22,[336,1064,1065],{"class":1028},"      path",[336,1067,931],{"class":704},[336,1069,1042],{"class":708},[336,1071,1045],{"class":704},[336,1073,1074],{"class":708},"url",[336,1076,1050],{"class":704},[336,1078,724],{"class":704},[336,1080,1081],{"class":345},"\u002F",[336,1083,879],{"class":704},[336,1085,769],{"class":704},[336,1087,1089,1092,1094,1096,1098,1100,1102,1105,1107,1110,1112,1115,1118,1121,1124,1127,1130,1132,1135,1138],{"class":338,"line":1088},23,[336,1090,1091],{"class":1028},"      requestId",[336,1093,931],{"class":704},[336,1095,952],{"class":1028},[336,1097,955],{"class":708},[336,1099,1045],{"class":704},[336,1101,466],{"class":708},[336,1103,1104],{"class":1028},"[",[336,1106,879],{"class":704},[336,1108,1109],{"class":345},"x-request-id",[336,1111,879],{"class":704},[336,1113,1114],{"class":1028},"] ",[336,1116,1117],{"class":697},"as",[336,1119,1120],{"class":342}," string",[336,1122,1123],{"class":1028},") ",[336,1125,1126],{"class":704},"||",[336,1128,1129],{"class":708}," crypto",[336,1131,1045],{"class":704},[336,1133,1134],{"class":863},"randomUUID",[336,1136,1137],{"class":1028},"()",[336,1139,769],{"class":704},[336,1141,1143,1146,1148,1151,1153,1155,1157,1159,1161],{"class":338,"line":1142},24,[336,1144,1145],{"class":1028},"      headers",[336,1147,931],{"class":704},[336,1149,1150],{"class":863}," extractSafeNodeHeaders",[336,1152,924],{"class":1028},[336,1154,955],{"class":708},[336,1156,1045],{"class":704},[336,1158,466],{"class":708},[336,1160,542],{"class":1028},[336,1162,769],{"class":704},[336,1164,1166,1169,1171],{"class":338,"line":1165},25,[336,1167,1168],{"class":704},"      ...",[336,1170,928],{"class":708},[336,1172,769],{"class":704},[336,1174,1176,1179],{"class":338,"line":1175},26,[336,1177,1178],{"class":704},"    }",[336,1180,887],{"class":1028},[336,1182,1184],{"class":338,"line":1183},27,[336,1185,817],{"emptyLinePlaceholder":816},[336,1187,1189,1192,1194,1196,1198],{"class":338,"line":1188},28,[336,1190,1191],{"class":697},"    if",[336,1193,952],{"class":1028},[336,1195,637],{"class":708},[336,1197,1123],{"class":1028},[336,1199,1031],{"class":704},[336,1201,1203,1206,1208],{"class":338,"line":1202},29,[336,1204,1205],{"class":697},"      await",[336,1207,973],{"class":863},[336,1209,1210],{"class":1028},"()\n",[336,1212,1214],{"class":338,"line":1213},30,[336,1215,1216],{"class":697},"      return\n",[336,1218,1220],{"class":338,"line":1219},31,[336,1221,1222],{"class":704},"    }\n",[336,1224,1226],{"class":338,"line":1225},32,[336,1227,817],{"emptyLinePlaceholder":816},[336,1229,1231,1234,1236,1238,1241,1243,1246,1248,1251,1253,1255,1257,1259,1261,1264,1266],{"class":338,"line":1230},33,[336,1232,1233],{"class":704},"    ;",[336,1235,924],{"class":1028},[336,1237,955],{"class":708},[336,1239,1240],{"class":697}," as",[336,1242,709],{"class":342},[336,1244,1245],{"class":704}," &",[336,1247,705],{"class":704},[336,1249,1250],{"class":1028}," log",[336,1252,931],{"class":704},[336,1254,742],{"class":342},[336,1256,718],{"class":704},[336,1258,542],{"class":1028},[336,1260,1045],{"class":704},[336,1262,1263],{"class":708},"log",[336,1265,832],{"class":704},[336,1267,1268],{"class":708}," logger\n",[336,1270,1272],{"class":338,"line":1271},34,[336,1273,817],{"emptyLinePlaceholder":816},[336,1275,1277,1280],{"class":338,"line":1276},35,[336,1278,1279],{"class":697},"    try",[336,1281,760],{"class":704},[336,1283,1285,1287,1289,1291,1294,1296,1298,1300,1302,1304,1306],{"class":338,"line":1284},36,[336,1286,1205],{"class":697},[336,1288,851],{"class":708},[336,1290,1045],{"class":704},[336,1292,1293],{"class":863},"run",[336,1295,924],{"class":1028},[336,1297,651],{"class":708},[336,1299,712],{"class":704},[336,1301,978],{"class":704},[336,1303,981],{"class":826},[336,1305,973],{"class":863},[336,1307,1308],{"class":1028},"())\n",[336,1310,1312,1314,1316,1318,1321,1324,1326,1328,1330,1332,1334],{"class":338,"line":1311},37,[336,1313,1205],{"class":697},[336,1315,1013],{"class":863},[336,1317,924],{"class":1028},[336,1319,1320],{"class":704},"{",[336,1322,1323],{"class":1028}," status",[336,1325,931],{"class":704},[336,1327,964],{"class":708},[336,1329,1045],{"class":704},[336,1331,541],{"class":708},[336,1333,718],{"class":704},[336,1335,887],{"class":1028},[336,1337,1339,1341,1344,1346,1349,1351],{"class":338,"line":1338},38,[336,1340,1178],{"class":704},[336,1342,1343],{"class":697}," catch",[336,1345,952],{"class":1028},[336,1347,1348],{"class":708},"error",[336,1350,1123],{"class":1028},[336,1352,1031],{"class":704},[336,1354,1356,1358,1360,1362,1364,1367,1369,1371,1373,1376,1378],{"class":338,"line":1355},39,[336,1357,1205],{"class":697},[336,1359,1013],{"class":863},[336,1361,924],{"class":1028},[336,1363,1320],{"class":704},[336,1365,1366],{"class":1028}," error",[336,1368,931],{"class":704},[336,1370,1366],{"class":708},[336,1372,1240],{"class":697},[336,1374,1375],{"class":342}," Error",[336,1377,718],{"class":704},[336,1379,887],{"class":1028},[336,1381,1383,1386],{"class":338,"line":1382},40,[336,1384,1385],{"class":697},"      throw",[336,1387,1388],{"class":708}," error\n",[336,1390,1392],{"class":338,"line":1391},41,[336,1393,1222],{"class":704},[336,1395,1397],{"class":338,"line":1396},42,[336,1398,1399],{"class":704},"  }\n",[336,1401,1403],{"class":338,"line":1402},43,[336,1404,1405],{"class":704},"}\n",[298,1407,1408,1409,1412],{},"That's it. This middleware gets ",[313,1410,1411],{},"every feature"," for free: route filtering, drain adapters, enrichers, tail sampling, error capture, and duration tracking.",[318,1414,1416],{"id":1415},"key-rules","Key Rules",[603,1418,1419,1431,1451,1471,1489,1498,1507],{},[606,1420,1421,1426,1427,1430],{},[313,1422,1423,1424],{},"Always use ",[302,1425,676],{}," - never call ",[302,1428,1429],{},"createRequestLogger"," directly",[606,1432,1433,1436,1437,1440,1441,1443,1444,1447,1448,1450],{},[313,1434,1435],{},"Use the right header extractor"," - ",[302,1438,1439],{},"extractSafeHeaders"," for Web API ",[302,1442,492],{}," (Hono, Elysia, Deno), ",[302,1445,1446],{},"extractSafeNodeHeaders"," for Node.js ",[302,1449,506],{}," (Express, Fastify)",[606,1452,1453,1436,1456,1459,1460,426,1462,426,1464,426,1466,426,1468,1470],{},[313,1454,1455],{},"Spread user options",[302,1457,1458],{},"...options"," passes ",[302,1461,425],{},[302,1463,429],{},[302,1465,432],{},[302,1467,435],{},[302,1469,438],{}," to the pipeline automatically",[606,1472,1473,1480,1481,1484,1485,1488],{},[313,1474,1475,1476,1479],{},"Call ",[302,1477,1478],{},"finish()"," in both paths"," - success (",[302,1482,1483],{},"{ status }",") and error (",[302,1486,1487],{},"{ error }",") - it handles emit + enrich + drain",[606,1490,1491,1494,1495,1497],{},[313,1492,1493],{},"Re-throw errors"," after ",[302,1496,1478],{}," so framework error handlers still work",[606,1499,1500,1506],{},[313,1501,1502,1503],{},"Export ",[302,1504,1505],{},"useLogger()"," - consumers expect it for accessing the logger from service functions",[606,1508,1509,1512,1513,1515,1516,426,1518,426,1520],{},[313,1510,1511],{},"Export your options type"," extending ",[302,1514,419],{}," - for IDE completion on ",[302,1517,425],{},[302,1519,429],{},[302,1521,432],{},[318,1523,1525],{"id":1524},"usage","Usage",[298,1527,1528],{},"Once built, your integration is used like any other:",[326,1530,1533],{"className":687,"code":1531,"filename":1532,"language":690,"meta":332,"style":332},"import { initLogger } from 'evlog'\nimport { evlog, useLogger } from '.\u002Fmy-framework-evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\ninitLogger({ env: { service: 'my-api' } })\n\napp.use(evlog({\n  include: ['\u002Fapi\u002F**'],\n  drain: createAxiomDrain(),\n  enrich: (ctx) => {\n    ctx.event.region = process.env.FLY_REGION\n  },\n  keep: (ctx) => {\n    if (ctx.duration && ctx.duration > 2000) ctx.shouldKeep = true\n  },\n}))\n\napp.get('\u002Fapi\u002Fusers', (req, res) => {\n  req.log.set({ users: { count: 42 } })\n  res.json({ users: [] })\n})\n\n\u002F\u002F Access logger from anywhere in the call stack\nfunction findUsers() {\n  const log = useLogger()\n  log.set({ db: { query: 'SELECT * FROM users' } })\n}\n","src\u002Findex.ts",[302,1534,1535,1554,1577,1597,1601,1635,1639,1657,1679,1692,1710,1740,1745,1762,1807,1811,1818,1822,1856,1895,1920,1926,1930,1936,1948,1961,1999],{"__ignoreMap":332},[336,1536,1537,1539,1541,1544,1546,1548,1550,1552],{"class":338,"line":339},[336,1538,698],{"class":697},[336,1540,705],{"class":704},[336,1542,1543],{"class":708}," initLogger",[336,1545,718],{"class":704},[336,1547,721],{"class":697},[336,1549,724],{"class":704},[336,1551,585],{"class":345},[336,1553,730],{"class":704},[336,1555,1556,1558,1560,1562,1564,1566,1568,1570,1572,1575],{"class":338,"line":733},[336,1557,698],{"class":697},[336,1559,705],{"class":704},[336,1561,921],{"class":708},[336,1563,712],{"class":704},[336,1565,902],{"class":708},[336,1567,718],{"class":704},[336,1569,721],{"class":697},[336,1571,724],{"class":704},[336,1573,1574],{"class":345},".\u002Fmy-framework-evlog",[336,1576,730],{"class":704},[336,1578,1579,1581,1583,1586,1588,1590,1592,1595],{"class":338,"line":755},[336,1580,698],{"class":697},[336,1582,705],{"class":704},[336,1584,1585],{"class":708}," createAxiomDrain",[336,1587,718],{"class":704},[336,1589,721],{"class":697},[336,1591,724],{"class":704},[336,1593,1594],{"class":345},"evlog\u002Faxiom",[336,1596,730],{"class":704},[336,1598,1599],{"class":338,"line":763},[336,1600,817],{"emptyLinePlaceholder":816},[336,1602,1603,1606,1608,1610,1613,1615,1617,1620,1622,1624,1627,1629,1631,1633],{"class":338,"line":772},[336,1604,1605],{"class":863},"initLogger",[336,1607,924],{"class":708},[336,1609,1320],{"class":704},[336,1611,1612],{"class":1028}," env",[336,1614,931],{"class":704},[336,1616,705],{"class":704},[336,1618,1619],{"class":1028}," service",[336,1621,931],{"class":704},[336,1623,724],{"class":704},[336,1625,1626],{"class":345},"my-api",[336,1628,879],{"class":704},[336,1630,718],{"class":704},[336,1632,718],{"class":704},[336,1634,887],{"class":708},[336,1636,1637],{"class":338,"line":780},[336,1638,817],{"emptyLinePlaceholder":816},[336,1640,1641,1644,1646,1649,1651,1653,1655],{"class":338,"line":788},[336,1642,1643],{"class":708},"app",[336,1645,1045],{"class":704},[336,1647,1648],{"class":863},"use",[336,1650,924],{"class":708},[336,1652,585],{"class":863},[336,1654,924],{"class":708},[336,1656,1031],{"class":704},[336,1658,1659,1662,1664,1667,1669,1672,1674,1677],{"class":338,"line":799},[336,1660,1661],{"class":1028},"  include",[336,1663,931],{"class":704},[336,1665,1666],{"class":708}," [",[336,1668,879],{"class":704},[336,1670,1671],{"class":345},"\u002Fapi\u002F**",[336,1673,879],{"class":704},[336,1675,1676],{"class":708},"]",[336,1678,769],{"class":704},[336,1680,1681,1684,1686,1688,1690],{"class":338,"line":813},[336,1682,1683],{"class":1028},"  drain",[336,1685,931],{"class":704},[336,1687,1585],{"class":863},[336,1689,1137],{"class":708},[336,1691,769],{"class":704},[336,1693,1694,1697,1699,1701,1704,1706,1708],{"class":338,"line":820},[336,1695,1696],{"class":863},"  enrich",[336,1698,931],{"class":704},[336,1700,952],{"class":704},[336,1702,1703],{"class":927},"ctx",[336,1705,542],{"class":704},[336,1707,981],{"class":826},[336,1709,760],{"class":704},[336,1711,1712,1715,1717,1720,1722,1725,1727,1730,1732,1735,1737],{"class":338,"line":838},[336,1713,1714],{"class":708},"    ctx",[336,1716,1045],{"class":704},[336,1718,1719],{"class":708},"event",[336,1721,1045],{"class":704},[336,1723,1724],{"class":708},"region",[336,1726,832],{"class":704},[336,1728,1729],{"class":708}," process",[336,1731,1045],{"class":704},[336,1733,1734],{"class":708},"env",[336,1736,1045],{"class":704},[336,1738,1739],{"class":708},"FLY_REGION\n",[336,1741,1742],{"class":338,"line":843},[336,1743,1744],{"class":704},"  },\n",[336,1746,1747,1750,1752,1754,1756,1758,1760],{"class":338,"line":870},[336,1748,1749],{"class":863},"  keep",[336,1751,931],{"class":704},[336,1753,952],{"class":704},[336,1755,1703],{"class":927},[336,1757,542],{"class":704},[336,1759,981],{"class":826},[336,1761,760],{"class":704},[336,1763,1764,1766,1768,1770,1772,1775,1778,1781,1783,1785,1788,1792,1794,1796,1798,1801,1803],{"class":338,"line":884},[336,1765,1191],{"class":697},[336,1767,952],{"class":1028},[336,1769,1703],{"class":708},[336,1771,1045],{"class":704},[336,1773,1774],{"class":708},"duration",[336,1776,1777],{"class":704}," &&",[336,1779,1780],{"class":708}," ctx",[336,1782,1045],{"class":704},[336,1784,1774],{"class":708},[336,1786,1787],{"class":704}," >",[336,1789,1791],{"class":1790},"sbssI"," 2000",[336,1793,1123],{"class":1028},[336,1795,1703],{"class":708},[336,1797,1045],{"class":704},[336,1799,1800],{"class":708},"shouldKeep",[336,1802,832],{"class":704},[336,1804,1806],{"class":1805},"sfNiH"," true\n",[336,1808,1809],{"class":338,"line":890},[336,1810,1744],{"class":704},[336,1812,1813,1815],{"class":338,"line":895},[336,1814,802],{"class":704},[336,1816,1817],{"class":708},"))\n",[336,1819,1820],{"class":338,"line":908},[336,1821,817],{"emptyLinePlaceholder":816},[336,1823,1824,1826,1828,1831,1833,1835,1838,1840,1842,1844,1846,1848,1850,1852,1854],{"class":338,"line":913},[336,1825,1643],{"class":708},[336,1827,1045],{"class":704},[336,1829,1830],{"class":863},"get",[336,1832,924],{"class":708},[336,1834,879],{"class":704},[336,1836,1837],{"class":345},"\u002Fapi\u002Fusers",[336,1839,879],{"class":704},[336,1841,712],{"class":704},[336,1843,952],{"class":704},[336,1845,955],{"class":927},[336,1847,712],{"class":704},[336,1849,964],{"class":927},[336,1851,542],{"class":704},[336,1853,981],{"class":826},[336,1855,760],{"class":704},[336,1857,1858,1861,1863,1865,1867,1870,1872,1874,1877,1879,1881,1884,1886,1889,1891,1893],{"class":338,"line":943},[336,1859,1860],{"class":708},"  req",[336,1862,1045],{"class":704},[336,1864,1263],{"class":708},[336,1866,1045],{"class":704},[336,1868,1869],{"class":863},"set",[336,1871,924],{"class":1028},[336,1873,1320],{"class":704},[336,1875,1876],{"class":1028}," users",[336,1878,931],{"class":704},[336,1880,705],{"class":704},[336,1882,1883],{"class":1028}," count",[336,1885,931],{"class":704},[336,1887,1888],{"class":1790}," 42",[336,1890,718],{"class":704},[336,1892,718],{"class":704},[336,1894,887],{"class":1028},[336,1896,1897,1900,1902,1905,1907,1909,1911,1913,1916,1918],{"class":338,"line":1000},[336,1898,1899],{"class":708},"  res",[336,1901,1045],{"class":704},[336,1903,1904],{"class":863},"json",[336,1906,924],{"class":1028},[336,1908,1320],{"class":704},[336,1910,1876],{"class":1028},[336,1912,931],{"class":704},[336,1914,1915],{"class":1028}," [] ",[336,1917,802],{"class":704},[336,1919,887],{"class":1028},[336,1921,1922,1924],{"class":338,"line":1034},[336,1923,802],{"class":704},[336,1925,887],{"class":708},[336,1927,1928],{"class":338,"line":1062},[336,1929,817],{"emptyLinePlaceholder":816},[336,1931,1932],{"class":338,"line":1088},[336,1933,1935],{"class":1934},"sHwdD","\u002F\u002F Access logger from anywhere in the call stack\n",[336,1937,1938,1941,1944,1946],{"class":338,"line":1142},[336,1939,1940],{"class":826},"function",[336,1942,1943],{"class":863}," findUsers",[336,1945,1137],{"class":704},[336,1947,760],{"class":704},[336,1949,1950,1953,1955,1957,1959],{"class":338,"line":1165},[336,1951,1952],{"class":826},"  const",[336,1954,1250],{"class":708},[336,1956,832],{"class":704},[336,1958,902],{"class":863},[336,1960,1210],{"class":1028},[336,1962,1963,1966,1968,1970,1972,1974,1977,1979,1981,1984,1986,1988,1991,1993,1995,1997],{"class":338,"line":1175},[336,1964,1965],{"class":708},"  log",[336,1967,1045],{"class":704},[336,1969,1869],{"class":863},[336,1971,924],{"class":1028},[336,1973,1320],{"class":704},[336,1975,1976],{"class":1028}," db",[336,1978,931],{"class":704},[336,1980,705],{"class":704},[336,1982,1983],{"class":1028}," query",[336,1985,931],{"class":704},[336,1987,724],{"class":704},[336,1989,1990],{"class":345},"SELECT * FROM users",[336,1992,879],{"class":704},[336,1994,718],{"class":704},[336,1996,718],{"class":704},[336,1998,887],{"class":1028},[336,2000,2001],{"class":338,"line":1183},[336,2002,1405],{"class":704},[318,2004,2006],{"id":2005},"reference-implementations","Reference Implementations",[298,2008,2009],{},"Study these built-in integrations for framework-specific patterns:",[384,2011,2012,2028],{},[387,2013,2014],{},[390,2015,2016,2019,2022,2025],{},[393,2017,2018],{},"Framework",[393,2020,2021],{},"Lines",[393,2023,2024],{},"Pattern",[393,2026,2027],{},"Source",[400,2029,2030,2053,2075,2101],{},[390,2031,2032,2034,2037,2044],{},[405,2033,155],{},[405,2035,2036],{},"~40",[405,2038,2039,2040,2043],{},"Web API Headers, ",[302,2041,2042],{},"c.set()",", try\u002Fcatch",[405,2045,2046],{},[2047,2048,2052],"a",{"href":2049,"rel":2050},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Fhono\u002Findex.ts",[2051],"nofollow","hono\u002Findex.ts",[390,2054,2055,2057,2060,2068],{},[405,2056,150],{},[405,2058,2059],{},"~60",[405,2061,2062,2063,426,2065],{},"Node.js headers, ",[302,2064,655],{},[302,2066,2067],{},"res.on('finish')",[405,2069,2070],{},[2047,2071,2074],{"href":2072,"rel":2073},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Fexpress\u002Findex.ts",[2051],"express\u002Findex.ts",[390,2076,2077,2079,2082,2094],{},[405,2078,165],{},[405,2080,2081],{},"~70",[405,2083,2084,2085,426,2088,1081,2091],{},"Plugin API, ",[302,2086,2087],{},"derive()",[302,2089,2090],{},"onAfterHandle",[302,2092,2093],{},"onError",[405,2095,2096],{},[2047,2097,2100],{"href":2098,"rel":2099},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Felysia\u002Findex.ts",[2051],"elysia\u002Findex.ts",[390,2102,2103,2105,2107,2120],{},[405,2104,160],{},[405,2106,2081],{},[405,2108,2109,2110,426,2113,1081,2116,2119],{},"Plugin, ",[302,2111,2112],{},"decorateRequest",[302,2114,2115],{},"onRequest",[302,2117,2118],{},"onResponse"," hooks",[405,2121,2122],{},[2047,2123,2126],{"href":2124,"rel":2125},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Ffastify\u002Findex.ts",[2051],"fastify\u002Findex.ts",[307,2128,2131,2132,2137],{"color":2129,"icon":2130},"neutral","i-lucide-heart","Built an integration for a framework we don't support? ",[2047,2133,2136],{"href":2134,"rel":2135},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fpulls",[2051],"Open a PR"," - the community will thank you.",[318,2139,2141],{"id":2140},"next-steps","Next Steps",[2143,2144,2145,2150,2155,2160],"ul",{},[606,2146,2147,2149],{},[2047,2148,46],{"href":47},": Design comprehensive events with context layering",[606,2151,2152,2154],{},[2047,2153,199],{"href":204},": Send logs to Axiom, Sentry, PostHog, and more",[606,2156,2157,2159],{},[2047,2158,81],{"href":82},": Control log volume with head and tail sampling",[606,2161,2162,2164,2165,426,2168,578,2171,2174],{},[2047,2163,51],{"href":52},": Throw errors with ",[302,2166,2167],{},"why",[302,2169,2170],{},"fix",[302,2172,2173],{},"link"," fields",[2176,2177,2178],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .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}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":332,"searchDepth":733,"depth":733,"links":2180},[2181,2182,2183,2184,2185,2186,2187,2188],{"id":320,"depth":733,"text":321},{"id":381,"depth":733,"text":382},{"id":589,"depth":733,"text":590},{"id":680,"depth":733,"text":681},{"id":1415,"depth":733,"text":1416},{"id":1524,"depth":733,"text":1525},{"id":2005,"depth":733,"text":2006},{"id":2140,"depth":733,"text":2141},"Build your own evlog framework integration using the toolkit API with createMiddlewareLogger, header extraction, AsyncLocalStorage, and the full drain\u002Fenrich\u002Fkeep pipeline.","md",null,{},{"title":189,"icon":192},{"title":189,"description":2189},"EQ6JjpZ9onn8gb01AOtKcBsrTyu_czukdMa_gu7AeAs",[2197,2199],{"title":184,"path":185,"stem":186,"description":2198,"icon":187,"children":-1},"Wide events and structured errors in Astro server middleware.",{"title":194,"path":195,"stem":196,"description":2200,"icon":197,"children":-1},"Wide events and structured logging in AWS Lambda functions, including SQS consumers and event-driven handlers.",1776042671045]