[{"data":1,"prerenderedAt":1699},["ShallowReactive",2],{"navigation_docs":3,"-adapters-cloud-better-stack":308,"-adapters-cloud-better-stack-surround":1694},[4,35,80,124,212,292],{"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,75],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F4.client-logging","i-lucide-monitor",{"title":66,"path":67,"stem":68,"icon":69},"AI SDK Integration","\u002Flogging\u002Fai-sdk","2.logging\u002F5.ai-sdk","i-simple-icons-vercel",{"title":71,"path":72,"stem":73,"icon":74},"Better Auth Integration","\u002Flogging\u002Fbetter-auth","2.logging\u002F6.better-auth","i-simple-icons-betterauth",{"title":76,"path":77,"stem":78,"icon":79},"Audit Logs","\u002Flogging\u002Faudit","2.logging\u002F7.audit","i-lucide-shield-check",{"title":81,"path":82,"stem":83,"children":84,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[85,90,95,100,105,109,114,119],{"title":86,"path":87,"stem":88,"icon":89},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":91,"path":92,"stem":93,"icon":94},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":96,"path":97,"stem":98,"icon":99},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":101,"path":102,"stem":103,"icon":104},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":106,"path":107,"stem":108,"icon":79},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":110,"path":111,"stem":112,"icon":113},"Performance","\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance","i-lucide-gauge",{"title":115,"path":116,"stem":117,"icon":118},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":120,"path":121,"stem":122,"icon":123},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":125,"path":126,"stem":127,"children":128,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[129,133,138,143,148,153,158,163,168,173,178,183,188,193,197,202,207],{"title":41,"path":130,"stem":131,"icon":132},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":134,"path":135,"stem":136,"icon":137},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":139,"path":140,"stem":141,"icon":142},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":144,"path":145,"stem":146,"icon":147},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":149,"path":150,"stem":151,"icon":152},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":154,"path":155,"stem":156,"icon":157},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":159,"path":160,"stem":161,"icon":162},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":164,"path":165,"stem":166,"icon":167},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":169,"path":170,"stem":171,"icon":172},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":174,"path":175,"stem":176,"icon":177},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":179,"path":180,"stem":181,"icon":182},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":184,"path":185,"stem":186,"icon":187},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":189,"path":190,"stem":191,"icon":192},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":194,"path":195,"stem":196,"icon":104},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":198,"path":199,"stem":200,"icon":201},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":203,"path":204,"stem":205,"icon":206},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":208,"path":209,"stem":210,"icon":211},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":213,"path":214,"stem":215,"children":216,"page":34},"Adapters","\u002Fadapters","6.adapters",[217,257,272],{"title":218,"path":219,"stem":220,"children":221,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[222,227,232,237,242,247,252],{"title":223,"path":224,"stem":225,"icon":226},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":228,"path":229,"stem":230,"icon":231},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":233,"path":234,"stem":235,"icon":236},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":238,"path":239,"stem":240,"icon":241},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":243,"path":244,"stem":245,"icon":246},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":248,"path":249,"stem":250,"icon":251},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":253,"path":254,"stem":255,"icon":256},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":258,"path":259,"stem":260,"children":261,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[262,267],{"title":263,"path":264,"stem":265,"icon":266},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":268,"path":269,"stem":270,"icon":271},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":273,"path":274,"stem":275,"children":276,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[277,282,287],{"title":278,"path":279,"stem":280,"icon":281},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":283,"path":284,"stem":285,"icon":286},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":288,"path":289,"stem":290,"icon":291},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom","i-lucide-code",{"title":293,"path":294,"stem":295,"children":296,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[297,300,304],{"title":41,"path":298,"stem":299,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":301,"path":302,"stem":303,"icon":211},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":305,"path":306,"stem":307,"icon":291},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":309,"title":310,"body":311,"description":1679,"extension":1680,"links":1681,"meta":1690,"navigation":1691,"path":244,"seo":1692,"stem":245,"__hash__":1693},"docs\u002F6.adapters\u002F02.cloud\u002F05.better-stack.md","Better Stack Adapter",{"type":312,"value":313,"toc":1656},"minimark",[314,324,366,370,373,417,420,425,448,452,471,475,1054,1057,1060,1063,1097,1101,1153,1157,1164,1231,1235,1238,1295,1299,1374,1378,1384,1407,1410,1414,1417,1457,1461,1465,1474,1477,1481,1487,1491,1494,1498,1501,1629,1633,1652],[315,316,317,323],"p",{},[318,319,243],"a",{"href":320,"rel":321},"https:\u002F\u002Fbetterstack.com",[322],"nofollow"," is a DX-first log management platform with powerful search, alerting, and dashboards. The evlog Better Stack adapter sends your wide events to the Better Stack HTTP ingestion API.",[325,326,329,332,354],"prompt",{":actions":327,"description":328,"icon":246},"[\"copy\",\"cursor\",\"windsurf\"]","Add the Better Stack drain adapter",[315,330,331],{},"Add the Better Stack drain adapter to send evlog wide events to Better Stack.",[333,334,335,339,342,345,348,351],"ol",{},[336,337,338],"li",{},"Identify which framework I'm using and follow its evlog integration pattern",[336,340,341],{},"Install evlog if not already installed",[336,343,344],{},"Import createBetterStackDrain from 'evlog\u002Fbetter-stack'",[336,346,347],{},"Wire createBetterStackDrain() into my framework's drain configuration",[336,349,350],{},"Set BETTER_STACK_SOURCE_TOKEN environment variable",[336,352,353],{},"Test by triggering a request and checking the Better Stack logs dashboard",[315,355,356,357,361,362],{},"Adapter docs: ",[318,358,359],{"href":359,"rel":360},"https:\u002F\u002Fwww.evlog.dev\u002Fadapters\u002Fcloud\u002Fbetter-stack",[322],"\nFramework setup: ",[318,363,364],{"href":364,"rel":365},"https:\u002F\u002Fwww.evlog.dev\u002Fframeworks",[322],[367,368,15],"h2",{"id":369},"installation",[315,371,372],{},"The Better Stack adapter comes bundled with evlog:",[374,375,381],"pre",{"className":376,"code":377,"filename":378,"language":379,"meta":380,"style":380},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createBetterStackDrain } from 'evlog\u002Fbetter-stack'\n","src\u002Findex.ts","typescript","",[382,383,384],"code",{"__ignoreMap":380},[385,386,389,393,397,401,404,407,410,414],"span",{"class":387,"line":388},"line",1,[385,390,392],{"class":391},"s7zQu","import",[385,394,396],{"class":395},"sMK4o"," {",[385,398,400],{"class":399},"sTEyZ"," createBetterStackDrain",[385,402,403],{"class":395}," }",[385,405,406],{"class":391}," from",[385,408,409],{"class":395}," '",[385,411,413],{"class":412},"sfazB","evlog\u002Fbetter-stack",[385,415,416],{"class":395},"'\n",[367,418,20],{"id":419},"quick-start",[421,422,424],"h3",{"id":423},"_1-get-your-source-token","1. Get your source token",[333,426,427,434,442],{},[336,428,429,430],{},"Create a ",[318,431,433],{"href":320,"rel":432},[322],"Better Stack account",[336,435,436,437,441],{},"Go to ",[438,439,440],"strong",{},"Telemetry > Sources"," and create a new source",[336,443,444,445],{},"Copy the ",[438,446,447],{},"Source Token",[421,449,451],{"id":450},"_2-set-environment-variables","2. Set environment variables",[374,453,458],{"className":454,"code":455,"filename":456,"language":457,"meta":380,"style":380},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","BETTER_STACK_SOURCE_TOKEN=your-source-token-here\n",".env","bash",[382,459,460],{"__ignoreMap":380},[385,461,462,465,468],{"class":387,"line":388},[385,463,464],{"class":399},"BETTER_STACK_SOURCE_TOKEN",[385,466,467],{"class":395},"=",[385,469,470],{"class":412},"your-source-token-here\n",[421,472,474],{"id":473},"_3-wire-the-drain-to-your-framework","3. Wire the drain to your framework",[476,477,478,593,724,786,840,899,953,1006],"code-group",{},[374,479,482],{"className":376,"code":480,"filename":481,"language":379,"meta":380,"style":380},"\u002F\u002F server\u002Fplugins\u002Fevlog-drain.ts\nimport { createBetterStackDrain } from 'evlog\u002Fbetter-stack'\n\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('evlog:drain', createBetterStackDrain())\n})\n","Nuxt \u002F Nitro",[382,483,484,490,509,516,548,584],{"__ignoreMap":380},[385,485,486],{"class":387,"line":388},[385,487,489],{"class":488},"sHwdD","\u002F\u002F server\u002Fplugins\u002Fevlog-drain.ts\n",[385,491,493,495,497,499,501,503,505,507],{"class":387,"line":492},2,[385,494,392],{"class":391},[385,496,396],{"class":395},[385,498,400],{"class":399},[385,500,403],{"class":395},[385,502,406],{"class":391},[385,504,409],{"class":395},[385,506,413],{"class":412},[385,508,416],{"class":395},[385,510,512],{"class":387,"line":511},3,[385,513,515],{"emptyLinePlaceholder":514},true,"\n",[385,517,519,522,525,529,532,534,538,541,545],{"class":387,"line":518},4,[385,520,521],{"class":391},"export",[385,523,524],{"class":391}," default",[385,526,528],{"class":527},"s2Zo4"," defineNitroPlugin",[385,530,531],{"class":399},"(",[385,533,531],{"class":395},[385,535,537],{"class":536},"sHdIc","nitroApp",[385,539,540],{"class":395},")",[385,542,544],{"class":543},"spNyl"," =>",[385,546,547],{"class":395}," {\n",[385,549,551,554,557,560,562,565,568,571,574,576,579,581],{"class":387,"line":550},5,[385,552,553],{"class":399},"  nitroApp",[385,555,556],{"class":395},".",[385,558,559],{"class":399},"hooks",[385,561,556],{"class":395},[385,563,564],{"class":527},"hook",[385,566,531],{"class":567},"swJcz",[385,569,570],{"class":395},"'",[385,572,573],{"class":412},"evlog:drain",[385,575,570],{"class":395},[385,577,578],{"class":395},",",[385,580,400],{"class":527},[385,582,583],{"class":567},"())\n",[385,585,587,590],{"class":387,"line":586},6,[385,588,589],{"class":395},"}",[385,591,592],{"class":399},")\n",[374,594,596],{"className":376,"code":595,"filename":139,"language":379,"meta":380,"style":380},"\u002F\u002F lib\u002Fevlog.ts\nimport { createEvlog } from 'evlog\u002Fnext'\nimport { createBetterStackDrain } from 'evlog\u002Fbetter-stack'\n\nexport const { withEvlog, useLogger, log, createError } = createEvlog({\n  service: 'my-app',\n  drain: createBetterStackDrain(),\n})\n",[382,597,598,603,623,641,645,684,702,717],{"__ignoreMap":380},[385,599,600],{"class":387,"line":388},[385,601,602],{"class":488},"\u002F\u002F lib\u002Fevlog.ts\n",[385,604,605,607,609,612,614,616,618,621],{"class":387,"line":492},[385,606,392],{"class":391},[385,608,396],{"class":395},[385,610,611],{"class":399}," createEvlog",[385,613,403],{"class":395},[385,615,406],{"class":391},[385,617,409],{"class":395},[385,619,620],{"class":412},"evlog\u002Fnext",[385,622,416],{"class":395},[385,624,625,627,629,631,633,635,637,639],{"class":387,"line":511},[385,626,392],{"class":391},[385,628,396],{"class":395},[385,630,400],{"class":399},[385,632,403],{"class":395},[385,634,406],{"class":391},[385,636,409],{"class":395},[385,638,413],{"class":412},[385,640,416],{"class":395},[385,642,643],{"class":387,"line":518},[385,644,515],{"emptyLinePlaceholder":514},[385,646,647,649,652,654,657,659,662,664,667,669,672,674,677,679,681],{"class":387,"line":550},[385,648,521],{"class":391},[385,650,651],{"class":543}," const",[385,653,396],{"class":395},[385,655,656],{"class":399}," withEvlog",[385,658,578],{"class":395},[385,660,661],{"class":399}," useLogger",[385,663,578],{"class":395},[385,665,666],{"class":399}," log",[385,668,578],{"class":395},[385,670,671],{"class":399}," createError ",[385,673,589],{"class":395},[385,675,676],{"class":395}," =",[385,678,611],{"class":527},[385,680,531],{"class":399},[385,682,683],{"class":395},"{\n",[385,685,686,689,692,694,697,699],{"class":387,"line":586},[385,687,688],{"class":567},"  service",[385,690,691],{"class":395},":",[385,693,409],{"class":395},[385,695,696],{"class":412},"my-app",[385,698,570],{"class":395},[385,700,701],{"class":395},",\n",[385,703,705,708,710,712,715],{"class":387,"line":704},7,[385,706,707],{"class":567},"  drain",[385,709,691],{"class":395},[385,711,400],{"class":527},[385,713,714],{"class":399},"()",[385,716,701],{"class":395},[385,718,720,722],{"class":387,"line":719},8,[385,721,589],{"class":395},[385,723,592],{"class":399},[374,725,727],{"className":376,"code":726,"filename":169,"language":379,"meta":380,"style":380},"import { createBetterStackDrain } from 'evlog\u002Fbetter-stack'\n\napp.use(evlog({ drain: createBetterStackDrain() }))\n",[382,728,729,747,751],{"__ignoreMap":380},[385,730,731,733,735,737,739,741,743,745],{"class":387,"line":388},[385,732,392],{"class":391},[385,734,396],{"class":395},[385,736,400],{"class":399},[385,738,403],{"class":395},[385,740,406],{"class":391},[385,742,409],{"class":395},[385,744,413],{"class":412},[385,746,416],{"class":395},[385,748,749],{"class":387,"line":492},[385,750,515],{"emptyLinePlaceholder":514},[385,752,753,756,758,761,763,766,768,771,774,776,778,781,783],{"class":387,"line":511},[385,754,755],{"class":399},"app",[385,757,556],{"class":395},[385,759,760],{"class":527},"use",[385,762,531],{"class":399},[385,764,765],{"class":527},"evlog",[385,767,531],{"class":399},[385,769,770],{"class":395},"{",[385,772,773],{"class":567}," drain",[385,775,691],{"class":395},[385,777,400],{"class":527},[385,779,780],{"class":399},"() ",[385,782,589],{"class":395},[385,784,785],{"class":399},"))\n",[374,787,788],{"className":376,"code":726,"filename":164,"language":379,"meta":380,"style":380},[382,789,790,808,812],{"__ignoreMap":380},[385,791,792,794,796,798,800,802,804,806],{"class":387,"line":388},[385,793,392],{"class":391},[385,795,396],{"class":395},[385,797,400],{"class":399},[385,799,403],{"class":395},[385,801,406],{"class":391},[385,803,409],{"class":395},[385,805,413],{"class":412},[385,807,416],{"class":395},[385,809,810],{"class":387,"line":492},[385,811,515],{"emptyLinePlaceholder":514},[385,813,814,816,818,820,822,824,826,828,830,832,834,836,838],{"class":387,"line":511},[385,815,755],{"class":399},[385,817,556],{"class":395},[385,819,760],{"class":527},[385,821,531],{"class":399},[385,823,765],{"class":527},[385,825,531],{"class":399},[385,827,770],{"class":395},[385,829,773],{"class":567},[385,831,691],{"class":395},[385,833,400],{"class":527},[385,835,780],{"class":399},[385,837,589],{"class":395},[385,839,785],{"class":399},[374,841,843],{"className":376,"code":842,"filename":174,"language":379,"meta":380,"style":380},"import { createBetterStackDrain } from 'evlog\u002Fbetter-stack'\n\nawait app.register(evlog, { drain: createBetterStackDrain() })\n",[382,844,845,863,867],{"__ignoreMap":380},[385,846,847,849,851,853,855,857,859,861],{"class":387,"line":388},[385,848,392],{"class":391},[385,850,396],{"class":395},[385,852,400],{"class":399},[385,854,403],{"class":395},[385,856,406],{"class":391},[385,858,409],{"class":395},[385,860,413],{"class":412},[385,862,416],{"class":395},[385,864,865],{"class":387,"line":492},[385,866,515],{"emptyLinePlaceholder":514},[385,868,869,872,875,877,880,883,885,887,889,891,893,895,897],{"class":387,"line":511},[385,870,871],{"class":391},"await",[385,873,874],{"class":399}," app",[385,876,556],{"class":395},[385,878,879],{"class":527},"register",[385,881,882],{"class":399},"(evlog",[385,884,578],{"class":395},[385,886,396],{"class":395},[385,888,773],{"class":567},[385,890,691],{"class":395},[385,892,400],{"class":527},[385,894,780],{"class":399},[385,896,589],{"class":395},[385,898,592],{"class":399},[374,900,901],{"className":376,"code":726,"filename":179,"language":379,"meta":380,"style":380},[382,902,903,921,925],{"__ignoreMap":380},[385,904,905,907,909,911,913,915,917,919],{"class":387,"line":388},[385,906,392],{"class":391},[385,908,396],{"class":395},[385,910,400],{"class":399},[385,912,403],{"class":395},[385,914,406],{"class":391},[385,916,409],{"class":395},[385,918,413],{"class":412},[385,920,416],{"class":395},[385,922,923],{"class":387,"line":492},[385,924,515],{"emptyLinePlaceholder":514},[385,926,927,929,931,933,935,937,939,941,943,945,947,949,951],{"class":387,"line":511},[385,928,755],{"class":399},[385,930,556],{"class":395},[385,932,760],{"class":527},[385,934,531],{"class":399},[385,936,765],{"class":527},[385,938,531],{"class":399},[385,940,770],{"class":395},[385,942,773],{"class":567},[385,944,691],{"class":395},[385,946,400],{"class":527},[385,948,780],{"class":399},[385,950,589],{"class":395},[385,952,785],{"class":399},[374,954,956],{"className":376,"code":955,"filename":159,"language":379,"meta":380,"style":380},"import { createBetterStackDrain } from 'evlog\u002Fbetter-stack'\n\nEvlogModule.forRoot({ drain: createBetterStackDrain() })\n",[382,957,958,976,980],{"__ignoreMap":380},[385,959,960,962,964,966,968,970,972,974],{"class":387,"line":388},[385,961,392],{"class":391},[385,963,396],{"class":395},[385,965,400],{"class":399},[385,967,403],{"class":395},[385,969,406],{"class":391},[385,971,409],{"class":395},[385,973,413],{"class":412},[385,975,416],{"class":395},[385,977,978],{"class":387,"line":492},[385,979,515],{"emptyLinePlaceholder":514},[385,981,982,985,987,990,992,994,996,998,1000,1002,1004],{"class":387,"line":511},[385,983,984],{"class":399},"EvlogModule",[385,986,556],{"class":395},[385,988,989],{"class":527},"forRoot",[385,991,531],{"class":399},[385,993,770],{"class":395},[385,995,773],{"class":567},[385,997,691],{"class":395},[385,999,400],{"class":527},[385,1001,780],{"class":399},[385,1003,589],{"class":395},[385,1005,592],{"class":399},[374,1007,1009],{"className":376,"code":1008,"filename":194,"language":379,"meta":380,"style":380},"import { createBetterStackDrain } from 'evlog\u002Fbetter-stack'\n\ninitLogger({ drain: createBetterStackDrain() })\n",[382,1010,1011,1029,1033],{"__ignoreMap":380},[385,1012,1013,1015,1017,1019,1021,1023,1025,1027],{"class":387,"line":388},[385,1014,392],{"class":391},[385,1016,396],{"class":395},[385,1018,400],{"class":399},[385,1020,403],{"class":395},[385,1022,406],{"class":391},[385,1024,409],{"class":395},[385,1026,413],{"class":412},[385,1028,416],{"class":395},[385,1030,1031],{"class":387,"line":492},[385,1032,515],{"emptyLinePlaceholder":514},[385,1034,1035,1038,1040,1042,1044,1046,1048,1050,1052],{"class":387,"line":511},[385,1036,1037],{"class":527},"initLogger",[385,1039,531],{"class":399},[385,1041,770],{"class":395},[385,1043,773],{"class":567},[385,1045,691],{"class":395},[385,1047,400],{"class":527},[385,1049,780],{"class":399},[385,1051,589],{"class":395},[385,1053,592],{"class":399},[315,1055,1056],{},"That's it! Your logs will now appear in Better Stack.",[367,1058,91],{"id":1059},"configuration",[315,1061,1062],{},"The adapter reads configuration from multiple sources (highest priority first):",[333,1064,1065,1074,1084],{},[336,1066,1067,1070,1071],{},[438,1068,1069],{},"Overrides"," passed to ",[382,1072,1073],{},"createBetterStackDrain()",[336,1075,1076,1079,1080,1083],{},[438,1077,1078],{},"Runtime config"," at ",[382,1081,1082],{},"runtimeConfig.betterStack"," (Nuxt\u002FNitro only)",[336,1085,1086,1089,1090,1093,1094,540],{},[438,1087,1088],{},"Environment variables"," (",[382,1091,1092],{},"BETTER_STACK_*"," or ",[382,1095,1096],{},"NUXT_BETTER_STACK_*",[421,1098,1100],{"id":1099},"environment-variables","Environment Variables",[1102,1103,1104,1120],"table",{},[1105,1106,1107],"thead",{},[1108,1109,1110,1114,1117],"tr",{},[1111,1112,1113],"th",{},"Variable",[1111,1115,1116],{},"Nuxt alias",[1111,1118,1119],{},"Description",[1121,1122,1123,1138],"tbody",{},[1108,1124,1125,1130,1135],{},[1126,1127,1128],"td",{},[382,1129,464],{},[1126,1131,1132],{},[382,1133,1134],{},"NUXT_BETTER_STACK_SOURCE_TOKEN",[1126,1136,1137],{},"Better Stack source token (required)",[1108,1139,1140,1145,1150],{},[1126,1141,1142],{},[382,1143,1144],{},"BETTER_STACK_ENDPOINT",[1126,1146,1147],{},[382,1148,1149],{},"NUXT_BETTER_STACK_ENDPOINT",[1126,1151,1152],{},"Custom ingestion endpoint",[421,1154,1156],{"id":1155},"runtime-config-nuxt-only","Runtime Config (Nuxt only)",[315,1158,1159,1160,1163],{},"Configure via ",[382,1161,1162],{},"nuxt.config.ts"," for type-safe configuration:",[374,1165,1167],{"className":376,"code":1166,"filename":1162,"language":379,"meta":380,"style":380},"export default defineNuxtConfig({\n  runtimeConfig: {\n    betterStack: {\n      sourceToken: '', \u002F\u002F Set via NUXT_BETTER_STACK_SOURCE_TOKEN\n    },\n  },\n})\n",[382,1168,1169,1182,1191,1200,1215,1220,1225],{"__ignoreMap":380},[385,1170,1171,1173,1175,1178,1180],{"class":387,"line":388},[385,1172,521],{"class":391},[385,1174,524],{"class":391},[385,1176,1177],{"class":527}," defineNuxtConfig",[385,1179,531],{"class":399},[385,1181,683],{"class":395},[385,1183,1184,1187,1189],{"class":387,"line":492},[385,1185,1186],{"class":567},"  runtimeConfig",[385,1188,691],{"class":395},[385,1190,547],{"class":395},[385,1192,1193,1196,1198],{"class":387,"line":511},[385,1194,1195],{"class":567},"    betterStack",[385,1197,691],{"class":395},[385,1199,547],{"class":395},[385,1201,1202,1205,1207,1210,1212],{"class":387,"line":518},[385,1203,1204],{"class":567},"      sourceToken",[385,1206,691],{"class":395},[385,1208,1209],{"class":395}," ''",[385,1211,578],{"class":395},[385,1213,1214],{"class":488}," \u002F\u002F Set via NUXT_BETTER_STACK_SOURCE_TOKEN\n",[385,1216,1217],{"class":387,"line":550},[385,1218,1219],{"class":395},"    },\n",[385,1221,1222],{"class":387,"line":586},[385,1223,1224],{"class":395},"  },\n",[385,1226,1227,1229],{"class":387,"line":704},[385,1228,589],{"class":395},[385,1230,592],{"class":399},[421,1232,1234],{"id":1233},"override-options","Override Options",[315,1236,1237],{},"Pass options directly to override any configuration:",[374,1239,1242],{"className":376,"code":1240,"filename":1241,"language":379,"meta":380,"style":380},"const drain = createBetterStackDrain({\n  sourceToken: 'my-token',\n  timeout: 10000,\n})\n","server\u002Fplugins\u002Fevlog-drain.ts",[382,1243,1244,1260,1276,1289],{"__ignoreMap":380},[385,1245,1246,1249,1252,1254,1256,1258],{"class":387,"line":388},[385,1247,1248],{"class":543},"const",[385,1250,1251],{"class":399}," drain ",[385,1253,467],{"class":395},[385,1255,400],{"class":527},[385,1257,531],{"class":399},[385,1259,683],{"class":395},[385,1261,1262,1265,1267,1269,1272,1274],{"class":387,"line":492},[385,1263,1264],{"class":567},"  sourceToken",[385,1266,691],{"class":395},[385,1268,409],{"class":395},[385,1270,1271],{"class":412},"my-token",[385,1273,570],{"class":395},[385,1275,701],{"class":395},[385,1277,1278,1281,1283,1287],{"class":387,"line":511},[385,1279,1280],{"class":567},"  timeout",[385,1282,691],{"class":395},[385,1284,1286],{"class":1285},"sbssI"," 10000",[385,1288,701],{"class":395},[385,1290,1291,1293],{"class":387,"line":518},[385,1292,589],{"class":395},[385,1294,592],{"class":399},[421,1296,1298],{"id":1297},"full-configuration-reference","Full Configuration Reference",[1102,1300,1301,1316],{},[1105,1302,1303],{},[1108,1304,1305,1308,1311,1314],{},[1111,1306,1307],{},"Option",[1111,1309,1310],{},"Type",[1111,1312,1313],{},"Default",[1111,1315,1119],{},[1121,1317,1318,1335,1354],{},[1108,1319,1320,1325,1330,1333],{},[1126,1321,1322],{},[382,1323,1324],{},"sourceToken",[1126,1326,1327],{},[382,1328,1329],{},"string",[1126,1331,1332],{},"-",[1126,1334,1137],{},[1108,1336,1337,1342,1346,1351],{},[1126,1338,1339],{},[382,1340,1341],{},"endpoint",[1126,1343,1344],{},[382,1345,1329],{},[1126,1347,1348],{},[382,1349,1350],{},"https:\u002F\u002Fin.logs.betterstack.com",[1126,1352,1353],{},"Ingestion endpoint",[1108,1355,1356,1361,1366,1371],{},[1126,1357,1358],{},[382,1359,1360],{},"timeout",[1126,1362,1363],{},[382,1364,1365],{},"number",[1126,1367,1368],{},[382,1369,1370],{},"5000",[1126,1372,1373],{},"Request timeout in milliseconds",[367,1375,1377],{"id":1376},"log-transformation","Log Transformation",[315,1379,1380,1381,691],{},"evlog wide events are transformed using ",[382,1382,1383],{},"toBetterStackEvent()",[1385,1386,1387,1401],"ul",{},[336,1388,1389,1392,1393,1396,1397,1400],{},[438,1390,1391],{},"Timestamp",": ",[382,1394,1395],{},"timestamp"," is mapped to ",[382,1398,1399],{},"dt"," (Better Stack's expected ISO-8601 timestamp field)",[336,1402,1403,1406],{},[438,1404,1405],{},"All other fields",": Spread as-is into the event body",[315,1408,1409],{},"Better Stack accepts arbitrary JSON fields, so all your wide event context (level, service, action, user data, etc.) is automatically searchable.",[367,1411,1413],{"id":1412},"querying-logs-in-better-stack","Querying Logs in Better Stack",[315,1415,1416],{},"Better Stack provides a powerful log search interface:",[1385,1418,1419,1425,1431,1445,1451],{},[336,1420,1421,1424],{},[438,1422,1423],{},"Live tail",": Stream logs in real time",[336,1426,1427,1430],{},[438,1428,1429],{},"Full-text search",": Search across all fields",[336,1432,1433,1436,1437,1440,1441,1444],{},[438,1434,1435],{},"Structured queries",": Filter by ",[382,1438,1439],{},"level:error",", ",[382,1442,1443],{},"service:my-app",", or any wide event field",[336,1446,1447,1450],{},[438,1448,1449],{},"Dashboards",": Create custom dashboards from your wide event data",[336,1452,1453,1456],{},[438,1454,1455],{},"Alerts",": Set up alerts based on log patterns or thresholds",[367,1458,1460],{"id":1459},"troubleshooting","Troubleshooting",[421,1462,1464],{"id":1463},"missing-source-token-error","Missing source token error",[374,1466,1472],{"className":1467,"code":1469,"filename":1470,"language":1471,"meta":380},[1468],"language-text","[evlog\u002Fbetter-stack] Missing source token. Set BETTER_STACK_SOURCE_TOKEN env var or pass to createBetterStackDrain()\n","Console","text",[382,1473,1469],{"__ignoreMap":380},[315,1475,1476],{},"Make sure your environment variable is set and the server was restarted after adding it.",[421,1478,1480],{"id":1479},"_401-unauthorized","401 Unauthorized",[315,1482,1483,1484,1486],{},"Your source token may be invalid or revoked. Generate a new source token in ",[438,1485,440],{}," in the Better Stack dashboard.",[421,1488,1490],{"id":1489},"_403-forbidden","403 Forbidden",[315,1492,1493],{},"The source may be archived or deleted. Create a new source in Better Stack.",[367,1495,1497],{"id":1496},"direct-api-usage","Direct API Usage",[315,1499,1500],{},"For advanced use cases, you can use the lower-level functions:",[374,1502,1505],{"className":376,"code":1503,"filename":1504,"language":379,"meta":380,"style":380},"import { sendToBetterStack, sendBatchToBetterStack } from 'evlog\u002Fbetter-stack'\n\n\u002F\u002F Send a single event\nawait sendToBetterStack(event, {\n  sourceToken: process.env.BETTER_STACK_SOURCE_TOKEN!,\n})\n\n\u002F\u002F Send multiple events in one request\nawait sendBatchToBetterStack(events, {\n  sourceToken: process.env.BETTER_STACK_SOURCE_TOKEN!,\n})\n","server\u002Futils\u002Fbetter-stack.ts",[382,1506,1507,1531,1535,1540,1553,1574,1580,1584,1589,1603,1622],{"__ignoreMap":380},[385,1508,1509,1511,1513,1516,1518,1521,1523,1525,1527,1529],{"class":387,"line":388},[385,1510,392],{"class":391},[385,1512,396],{"class":395},[385,1514,1515],{"class":399}," sendToBetterStack",[385,1517,578],{"class":395},[385,1519,1520],{"class":399}," sendBatchToBetterStack",[385,1522,403],{"class":395},[385,1524,406],{"class":391},[385,1526,409],{"class":395},[385,1528,413],{"class":412},[385,1530,416],{"class":395},[385,1532,1533],{"class":387,"line":492},[385,1534,515],{"emptyLinePlaceholder":514},[385,1536,1537],{"class":387,"line":511},[385,1538,1539],{"class":488},"\u002F\u002F Send a single event\n",[385,1541,1542,1544,1546,1549,1551],{"class":387,"line":518},[385,1543,871],{"class":391},[385,1545,1515],{"class":527},[385,1547,1548],{"class":399},"(event",[385,1550,578],{"class":395},[385,1552,547],{"class":395},[385,1554,1555,1557,1559,1562,1564,1567,1569,1571],{"class":387,"line":550},[385,1556,1264],{"class":567},[385,1558,691],{"class":395},[385,1560,1561],{"class":399}," process",[385,1563,556],{"class":395},[385,1565,1566],{"class":399},"env",[385,1568,556],{"class":395},[385,1570,464],{"class":399},[385,1572,1573],{"class":395},"!,\n",[385,1575,1576,1578],{"class":387,"line":586},[385,1577,589],{"class":395},[385,1579,592],{"class":399},[385,1581,1582],{"class":387,"line":704},[385,1583,515],{"emptyLinePlaceholder":514},[385,1585,1586],{"class":387,"line":719},[385,1587,1588],{"class":488},"\u002F\u002F Send multiple events in one request\n",[385,1590,1592,1594,1596,1599,1601],{"class":387,"line":1591},9,[385,1593,871],{"class":391},[385,1595,1520],{"class":527},[385,1597,1598],{"class":399},"(events",[385,1600,578],{"class":395},[385,1602,547],{"class":395},[385,1604,1606,1608,1610,1612,1614,1616,1618,1620],{"class":387,"line":1605},10,[385,1607,1264],{"class":567},[385,1609,691],{"class":395},[385,1611,1561],{"class":399},[385,1613,556],{"class":395},[385,1615,1566],{"class":399},[385,1617,556],{"class":395},[385,1619,464],{"class":399},[385,1621,1573],{"class":395},[385,1623,1625,1627],{"class":387,"line":1624},11,[385,1626,589],{"class":395},[385,1628,592],{"class":399},[367,1630,1632],{"id":1631},"next-steps","Next Steps",[1385,1634,1635,1641,1647],{},[336,1636,1637,1640],{},[318,1638,1639],{"href":224},"Axiom Adapter"," - Send logs to Axiom for querying and dashboards",[336,1642,1643,1646],{},[318,1644,1645],{"href":229},"OTLP Adapter"," - Send logs via OpenTelemetry Protocol",[336,1648,1649,1651],{},[318,1650,288],{"href":289}," - Build your own adapter",[1653,1654,1655],"style",{},"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 .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 .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}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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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}",{"title":380,"searchDepth":492,"depth":492,"links":1657},[1658,1659,1664,1670,1671,1672,1677,1678],{"id":369,"depth":492,"text":15},{"id":419,"depth":492,"text":20,"children":1660},[1661,1662,1663],{"id":423,"depth":511,"text":424},{"id":450,"depth":511,"text":451},{"id":473,"depth":511,"text":474},{"id":1059,"depth":492,"text":91,"children":1665},[1666,1667,1668,1669],{"id":1099,"depth":511,"text":1100},{"id":1155,"depth":511,"text":1156},{"id":1233,"depth":511,"text":1234},{"id":1297,"depth":511,"text":1298},{"id":1376,"depth":492,"text":1377},{"id":1412,"depth":492,"text":1413},{"id":1459,"depth":492,"text":1460,"children":1673},[1674,1675,1676],{"id":1463,"depth":511,"text":1464},{"id":1479,"depth":511,"text":1480},{"id":1489,"depth":511,"text":1490},{"id":1496,"depth":492,"text":1497},{"id":1631,"depth":492,"text":1632},"Send wide events to Better Stack (formerly Logtail) for log management, alerting, and dashboards. Zero-config setup with environment variables.","md",[1682,1689],{"label":1683,"icon":1684,"to":1685,"target":1686,"color":1687,"variant":1688},"Better Stack Dashboard","i-lucide-external-link","https:\u002F\u002Flogs.betterstack.com","_blank","neutral","subtle",{"label":1639,"icon":226,"to":224,"color":1687,"variant":1688},{},{"title":243,"icon":246},{"title":310,"description":1679},"B_QqWuZ9Me2mqWlf-hzgggYBJABpAxHnh5FO2zcOygc",[1695,1697],{"title":238,"path":239,"stem":240,"description":1696,"icon":241,"children":-1},"Send structured logs to Sentry Logs for high-cardinality querying and debugging. Zero-config setup with environment variables.",{"title":248,"path":249,"stem":250,"description":1698,"icon":251,"children":-1},"Send wide events to Datadog Logs via the native HTTP intake API. Supports all Datadog sites and DD_* environment variables.",1777667170038]