[{"data":1,"prerenderedAt":1442},["ShallowReactive",2],{"navigation_docs":3,"-adapters-better-stack":219,"-adapters-better-stack-surround":1437},[4,30,105,139,188,205],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","/getting-started","1.getting-started",[9,14,19,24],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","/getting-started/introduction","1.getting-started/1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","/getting-started/installation","1.getting-started/2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","/getting-started/quick-start","1.getting-started/3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","/getting-started/agent-skills","1.getting-started/4.agent-skills","i-lucide-sparkles",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Frameworks","/frameworks","2.frameworks",[35,40,45,50,55,60,65,70,75,80,85,90,95,100],{"title":36,"path":37,"stem":38,"icon":39},"Overview","/frameworks/overview","2.frameworks/00.overview","i-lucide-layout-grid",{"title":41,"path":42,"stem":43,"icon":44},"Nuxt","/frameworks/nuxt","2.frameworks/01.nuxt","i-simple-icons-nuxtdotjs",{"title":46,"path":47,"stem":48,"icon":49},"Next.js","/frameworks/nextjs","2.frameworks/02.nextjs","i-simple-icons-nextdotjs",{"title":51,"path":52,"stem":53,"icon":54},"SvelteKit","/frameworks/sveltekit","2.frameworks/03.sveltekit","i-simple-icons-svelte",{"title":56,"path":57,"stem":58,"icon":59},"Nitro","/frameworks/nitro","2.frameworks/04.nitro","i-custom-nitro",{"title":61,"path":62,"stem":63,"icon":64},"TanStack Start","/frameworks/tanstack-start","2.frameworks/05.tanstack-start","i-custom-tanstack",{"title":66,"path":67,"stem":68,"icon":69},"NestJS","/frameworks/nestjs","2.frameworks/06.nestjs","i-simple-icons-nestjs",{"title":71,"path":72,"stem":73,"icon":74},"Express","/frameworks/express","2.frameworks/07.express","i-simple-icons-express",{"title":76,"path":77,"stem":78,"icon":79},"Hono","/frameworks/hono","2.frameworks/08.hono","i-simple-icons-hono",{"title":81,"path":82,"stem":83,"icon":84},"Fastify","/frameworks/fastify","2.frameworks/09.fastify","i-simple-icons-fastify",{"title":86,"path":87,"stem":88,"icon":89},"Elysia","/frameworks/elysia","2.frameworks/10.elysia","i-custom-elysia",{"title":91,"path":92,"stem":93,"icon":94},"Cloudflare Workers","/frameworks/cloudflare-workers","2.frameworks/11.cloudflare-workers","i-simple-icons-cloudflare",{"title":96,"path":97,"stem":98,"icon":99},"Standalone","/frameworks/standalone","2.frameworks/12.standalone","i-simple-icons-typescript",{"title":101,"path":102,"stem":103,"icon":104},"Astro","/frameworks/astro","2.frameworks/13.astro","i-simple-icons-astro",{"title":106,"path":107,"stem":108,"children":109,"page":29},"Core Concepts","/core-concepts","3.core-concepts",[110,115,120,125,129,134],{"title":111,"path":112,"stem":113,"icon":114},"Wide Events","/core-concepts/wide-events","3.core-concepts/1.wide-events","i-lucide-layers",{"title":116,"path":117,"stem":118,"icon":119},"Structured Errors","/core-concepts/structured-errors","3.core-concepts/2.structured-errors","i-lucide-shield-alert",{"title":121,"path":122,"stem":123,"icon":124},"Best Practices","/core-concepts/best-practices","3.core-concepts/3.best-practices","i-lucide-shield-check",{"title":126,"path":127,"stem":128,"icon":99},"Typed Fields","/core-concepts/typed-fields","3.core-concepts/4.typed-fields",{"title":130,"path":131,"stem":132,"icon":133},"Sampling","/core-concepts/sampling","3.core-concepts/5.sampling","i-lucide-filter",{"title":135,"path":136,"stem":137,"icon":138},"Client Logging","/core-concepts/client-logging","3.core-concepts/6.client-logging","i-lucide-monitor",{"title":140,"path":141,"stem":142,"children":143,"page":29},"Adapters","/adapters","4.adapters",[144,148,153,158,163,168,173,178,183],{"title":36,"path":145,"stem":146,"icon":147},"/adapters/overview","4.adapters/1.overview","i-custom-plug",{"title":149,"path":150,"stem":151,"icon":152},"Axiom","/adapters/axiom","4.adapters/2.axiom","i-custom-axiom",{"title":154,"path":155,"stem":156,"icon":157},"OTLP","/adapters/otlp","4.adapters/3.otlp","i-simple-icons-opentelemetry",{"title":159,"path":160,"stem":161,"icon":162},"PostHog","/adapters/posthog","4.adapters/4.posthog","i-simple-icons-posthog",{"title":164,"path":165,"stem":166,"icon":167},"Sentry","/adapters/sentry","4.adapters/5.sentry","i-simple-icons-sentry",{"title":169,"path":170,"stem":171,"icon":172},"Better Stack","/adapters/better-stack","4.adapters/6.better-stack","i-simple-icons-betterstack",{"title":174,"path":175,"stem":176,"icon":177},"Custom Adapters","/adapters/custom","4.adapters/7.custom","i-lucide-code",{"title":179,"path":180,"stem":181,"icon":182},"Pipeline","/adapters/pipeline","4.adapters/8.pipeline","i-lucide-workflow",{"title":184,"path":185,"stem":186,"icon":187},"Browser","/adapters/browser","4.adapters/9.browser","i-lucide-globe",{"title":189,"path":190,"stem":191,"children":192,"page":29},"Enrichers","/enrichers","5.enrichers",[193,196,201],{"title":36,"path":194,"stem":195,"icon":28},"/enrichers/overview","5.enrichers/1.overview",{"title":197,"path":198,"stem":199,"icon":200},"Built-in","/enrichers/built-in","5.enrichers/2.built-in","i-lucide-puzzle",{"title":202,"path":203,"stem":204,"icon":177},"Custom","/enrichers/custom","5.enrichers/3.custom",{"title":206,"path":207,"stem":208,"children":209,"page":29},"NuxtHub","/nuxthub","6.nuxthub",[210,214],{"title":36,"path":211,"stem":212,"icon":213},"/nuxthub/overview","6.nuxthub/1.overview","i-lucide-database",{"title":215,"path":216,"stem":217,"icon":218},"Retention","/nuxthub/retention","6.nuxthub/2.retention","i-lucide-clock",{"id":220,"title":221,"body":222,"description":1422,"extension":1423,"links":1424,"meta":1433,"navigation":1434,"path":170,"seo":1435,"stem":171,"__hash__":1436},"docs/4.adapters/6.better-stack.md","Better Stack Adapter",{"type":223,"value":224,"toc":1399},"minimark",[225,235,239,242,285,288,293,318,322,341,345,794,797,801,804,838,842,894,898,905,974,978,981,1038,1042,1117,1121,1127,1150,1153,1157,1160,1200,1204,1208,1216,1219,1223,1229,1233,1236,1240,1243,1372,1376,1395],[226,227,228,234],"p",{},[229,230,169],"a",{"href":231,"rel":232},"https://betterstack.com",[233],"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.",[236,237,15],"h2",{"id":238},"installation",[226,240,241],{},"The Better Stack adapter comes bundled with evlog:",[243,244,249],"pre",{"className":245,"code":246,"language":247,"meta":248,"style":248},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createBetterStackDrain } from 'evlog/better-stack'\n","typescript","",[250,251,252],"code",{"__ignoreMap":248},[253,254,257,261,265,269,272,275,278,282],"span",{"class":255,"line":256},"line",1,[253,258,260],{"class":259},"s7zQu","import",[253,262,264],{"class":263},"sMK4o"," {",[253,266,268],{"class":267},"sTEyZ"," createBetterStackDrain",[253,270,271],{"class":263}," }",[253,273,274],{"class":259}," from",[253,276,277],{"class":263}," '",[253,279,281],{"class":280},"sfazB","evlog/better-stack",[253,283,284],{"class":263},"'\n",[236,286,20],{"id":287},"quick-start",[289,290,292],"h3",{"id":291},"_1-get-your-source-token","1. Get your source token",[294,295,296,304,312],"ol",{},[297,298,299,300],"li",{},"Create a ",[229,301,303],{"href":231,"rel":302},[233],"Better Stack account",[297,305,306,307,311],{},"Go to ",[308,309,310],"strong",{},"Telemetry > Sources"," and create a new source",[297,313,314,315],{},"Copy the ",[308,316,317],{},"Source Token",[289,319,321],{"id":320},"_2-set-environment-variables","2. Set environment variables",[243,323,328],{"className":324,"code":325,"filename":326,"language":327,"meta":248,"style":248},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","BETTER_STACK_SOURCE_TOKEN=your-source-token-here\n",".env","bash",[250,329,330],{"__ignoreMap":248},[253,331,332,335,338],{"class":255,"line":256},[253,333,334],{"class":267},"BETTER_STACK_SOURCE_TOKEN",[253,336,337],{"class":263},"=",[253,339,340],{"class":280},"your-source-token-here\n",[289,342,344],{"id":343},"_3-wire-the-drain-to-your-framework","3. Wire the drain to your framework",[346,347,348,463,526,580,639,693,746],"code-group",{},[243,349,352],{"className":245,"code":350,"filename":351,"language":247,"meta":248,"style":248},"// server/plugins/evlog-drain.ts\nimport { createBetterStackDrain } from 'evlog/better-stack'\n\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('evlog:drain', createBetterStackDrain())\n})\n","Nuxt / Nitro",[250,353,354,360,379,386,418,454],{"__ignoreMap":248},[253,355,356],{"class":255,"line":256},[253,357,359],{"class":358},"sHwdD","// server/plugins/evlog-drain.ts\n",[253,361,363,365,367,369,371,373,375,377],{"class":255,"line":362},2,[253,364,260],{"class":259},[253,366,264],{"class":263},[253,368,268],{"class":267},[253,370,271],{"class":263},[253,372,274],{"class":259},[253,374,277],{"class":263},[253,376,281],{"class":280},[253,378,284],{"class":263},[253,380,382],{"class":255,"line":381},3,[253,383,385],{"emptyLinePlaceholder":384},true,"\n",[253,387,389,392,395,399,402,404,408,411,415],{"class":255,"line":388},4,[253,390,391],{"class":259},"export",[253,393,394],{"class":259}," default",[253,396,398],{"class":397},"s2Zo4"," defineNitroPlugin",[253,400,401],{"class":267},"(",[253,403,401],{"class":263},[253,405,407],{"class":406},"sHdIc","nitroApp",[253,409,410],{"class":263},")",[253,412,414],{"class":413},"spNyl"," =>",[253,416,417],{"class":263}," {\n",[253,419,421,424,427,430,432,435,438,441,444,446,449,451],{"class":255,"line":420},5,[253,422,423],{"class":267},"  nitroApp",[253,425,426],{"class":263},".",[253,428,429],{"class":267},"hooks",[253,431,426],{"class":263},[253,433,434],{"class":397},"hook",[253,436,401],{"class":437},"swJcz",[253,439,440],{"class":263},"'",[253,442,443],{"class":280},"evlog:drain",[253,445,440],{"class":263},[253,447,448],{"class":263},",",[253,450,268],{"class":397},[253,452,453],{"class":437},"())\n",[253,455,457,460],{"class":255,"line":456},6,[253,458,459],{"class":263},"}",[253,461,462],{"class":267},")\n",[243,464,466],{"className":245,"code":465,"filename":76,"language":247,"meta":248,"style":248},"import { createBetterStackDrain } from 'evlog/better-stack'\n\napp.use(evlog({ drain: createBetterStackDrain() }))\n",[250,467,468,486,490],{"__ignoreMap":248},[253,469,470,472,474,476,478,480,482,484],{"class":255,"line":256},[253,471,260],{"class":259},[253,473,264],{"class":263},[253,475,268],{"class":267},[253,477,271],{"class":263},[253,479,274],{"class":259},[253,481,277],{"class":263},[253,483,281],{"class":280},[253,485,284],{"class":263},[253,487,488],{"class":255,"line":362},[253,489,385],{"emptyLinePlaceholder":384},[253,491,492,495,497,500,502,505,507,510,513,516,518,521,523],{"class":255,"line":381},[253,493,494],{"class":267},"app",[253,496,426],{"class":263},[253,498,499],{"class":397},"use",[253,501,401],{"class":267},[253,503,504],{"class":397},"evlog",[253,506,401],{"class":267},[253,508,509],{"class":263},"{",[253,511,512],{"class":437}," drain",[253,514,515],{"class":263},":",[253,517,268],{"class":397},[253,519,520],{"class":267},"() ",[253,522,459],{"class":263},[253,524,525],{"class":267},"))\n",[243,527,528],{"className":245,"code":465,"filename":71,"language":247,"meta":248,"style":248},[250,529,530,548,552],{"__ignoreMap":248},[253,531,532,534,536,538,540,542,544,546],{"class":255,"line":256},[253,533,260],{"class":259},[253,535,264],{"class":263},[253,537,268],{"class":267},[253,539,271],{"class":263},[253,541,274],{"class":259},[253,543,277],{"class":263},[253,545,281],{"class":280},[253,547,284],{"class":263},[253,549,550],{"class":255,"line":362},[253,551,385],{"emptyLinePlaceholder":384},[253,553,554,556,558,560,562,564,566,568,570,572,574,576,578],{"class":255,"line":381},[253,555,494],{"class":267},[253,557,426],{"class":263},[253,559,499],{"class":397},[253,561,401],{"class":267},[253,563,504],{"class":397},[253,565,401],{"class":267},[253,567,509],{"class":263},[253,569,512],{"class":437},[253,571,515],{"class":263},[253,573,268],{"class":397},[253,575,520],{"class":267},[253,577,459],{"class":263},[253,579,525],{"class":267},[243,581,583],{"className":245,"code":582,"filename":81,"language":247,"meta":248,"style":248},"import { createBetterStackDrain } from 'evlog/better-stack'\n\nawait app.register(evlog, { drain: createBetterStackDrain() })\n",[250,584,585,603,607],{"__ignoreMap":248},[253,586,587,589,591,593,595,597,599,601],{"class":255,"line":256},[253,588,260],{"class":259},[253,590,264],{"class":263},[253,592,268],{"class":267},[253,594,271],{"class":263},[253,596,274],{"class":259},[253,598,277],{"class":263},[253,600,281],{"class":280},[253,602,284],{"class":263},[253,604,605],{"class":255,"line":362},[253,606,385],{"emptyLinePlaceholder":384},[253,608,609,612,615,617,620,623,625,627,629,631,633,635,637],{"class":255,"line":381},[253,610,611],{"class":259},"await",[253,613,614],{"class":267}," app",[253,616,426],{"class":263},[253,618,619],{"class":397},"register",[253,621,622],{"class":267},"(evlog",[253,624,448],{"class":263},[253,626,264],{"class":263},[253,628,512],{"class":437},[253,630,515],{"class":263},[253,632,268],{"class":397},[253,634,520],{"class":267},[253,636,459],{"class":263},[253,638,462],{"class":267},[243,640,641],{"className":245,"code":465,"filename":86,"language":247,"meta":248,"style":248},[250,642,643,661,665],{"__ignoreMap":248},[253,644,645,647,649,651,653,655,657,659],{"class":255,"line":256},[253,646,260],{"class":259},[253,648,264],{"class":263},[253,650,268],{"class":267},[253,652,271],{"class":263},[253,654,274],{"class":259},[253,656,277],{"class":263},[253,658,281],{"class":280},[253,660,284],{"class":263},[253,662,663],{"class":255,"line":362},[253,664,385],{"emptyLinePlaceholder":384},[253,666,667,669,671,673,675,677,679,681,683,685,687,689,691],{"class":255,"line":381},[253,668,494],{"class":267},[253,670,426],{"class":263},[253,672,499],{"class":397},[253,674,401],{"class":267},[253,676,504],{"class":397},[253,678,401],{"class":267},[253,680,509],{"class":263},[253,682,512],{"class":437},[253,684,515],{"class":263},[253,686,268],{"class":397},[253,688,520],{"class":267},[253,690,459],{"class":263},[253,692,525],{"class":267},[243,694,696],{"className":245,"code":695,"filename":66,"language":247,"meta":248,"style":248},"import { createBetterStackDrain } from 'evlog/better-stack'\n\nEvlogModule.forRoot({ drain: createBetterStackDrain() })\n",[250,697,698,716,720],{"__ignoreMap":248},[253,699,700,702,704,706,708,710,712,714],{"class":255,"line":256},[253,701,260],{"class":259},[253,703,264],{"class":263},[253,705,268],{"class":267},[253,707,271],{"class":263},[253,709,274],{"class":259},[253,711,277],{"class":263},[253,713,281],{"class":280},[253,715,284],{"class":263},[253,717,718],{"class":255,"line":362},[253,719,385],{"emptyLinePlaceholder":384},[253,721,722,725,727,730,732,734,736,738,740,742,744],{"class":255,"line":381},[253,723,724],{"class":267},"EvlogModule",[253,726,426],{"class":263},[253,728,729],{"class":397},"forRoot",[253,731,401],{"class":267},[253,733,509],{"class":263},[253,735,512],{"class":437},[253,737,515],{"class":263},[253,739,268],{"class":397},[253,741,520],{"class":267},[253,743,459],{"class":263},[253,745,462],{"class":267},[243,747,749],{"className":245,"code":748,"filename":96,"language":247,"meta":248,"style":248},"import { createBetterStackDrain } from 'evlog/better-stack'\n\ninitLogger({ drain: createBetterStackDrain() })\n",[250,750,751,769,773],{"__ignoreMap":248},[253,752,753,755,757,759,761,763,765,767],{"class":255,"line":256},[253,754,260],{"class":259},[253,756,264],{"class":263},[253,758,268],{"class":267},[253,760,271],{"class":263},[253,762,274],{"class":259},[253,764,277],{"class":263},[253,766,281],{"class":280},[253,768,284],{"class":263},[253,770,771],{"class":255,"line":362},[253,772,385],{"emptyLinePlaceholder":384},[253,774,775,778,780,782,784,786,788,790,792],{"class":255,"line":381},[253,776,777],{"class":397},"initLogger",[253,779,401],{"class":267},[253,781,509],{"class":263},[253,783,512],{"class":437},[253,785,515],{"class":263},[253,787,268],{"class":397},[253,789,520],{"class":267},[253,791,459],{"class":263},[253,793,462],{"class":267},[226,795,796],{},"That's it! Your logs will now appear in Better Stack.",[236,798,800],{"id":799},"configuration","Configuration",[226,802,803],{},"The adapter reads configuration from multiple sources (highest priority first):",[294,805,806,815,825],{},[297,807,808,811,812],{},[308,809,810],{},"Overrides"," passed to ",[250,813,814],{},"createBetterStackDrain()",[297,816,817,820,821,824],{},[308,818,819],{},"Runtime config"," at ",[250,822,823],{},"runtimeConfig.betterStack"," (Nuxt/Nitro only)",[297,826,827,830,831,834,835,410],{},[308,828,829],{},"Environment variables"," (",[250,832,833],{},"BETTER_STACK_*"," or ",[250,836,837],{},"NUXT_BETTER_STACK_*",[289,839,841],{"id":840},"environment-variables","Environment Variables",[843,844,845,861],"table",{},[846,847,848],"thead",{},[849,850,851,855,858],"tr",{},[852,853,854],"th",{},"Variable",[852,856,857],{},"Nuxt alias",[852,859,860],{},"Description",[862,863,864,879],"tbody",{},[849,865,866,871,876],{},[867,868,869],"td",{},[250,870,334],{},[867,872,873],{},[250,874,875],{},"NUXT_BETTER_STACK_SOURCE_TOKEN",[867,877,878],{},"Better Stack source token (required)",[849,880,881,886,891],{},[867,882,883],{},[250,884,885],{},"BETTER_STACK_ENDPOINT",[867,887,888],{},[250,889,890],{},"NUXT_BETTER_STACK_ENDPOINT",[867,892,893],{},"Custom ingestion endpoint",[289,895,897],{"id":896},"runtime-config-nuxt-only","Runtime Config (Nuxt only)",[226,899,900,901,904],{},"Configure via ",[250,902,903],{},"nuxt.config.ts"," for type-safe configuration:",[243,906,908],{"className":245,"code":907,"filename":903,"language":247,"meta":248,"style":248},"export default defineNuxtConfig({\n  runtimeConfig: {\n    betterStack: {\n      sourceToken: '', // Set via NUXT_BETTER_STACK_SOURCE_TOKEN\n    },\n  },\n})\n",[250,909,910,924,933,942,957,962,967],{"__ignoreMap":248},[253,911,912,914,916,919,921],{"class":255,"line":256},[253,913,391],{"class":259},[253,915,394],{"class":259},[253,917,918],{"class":397}," defineNuxtConfig",[253,920,401],{"class":267},[253,922,923],{"class":263},"{\n",[253,925,926,929,931],{"class":255,"line":362},[253,927,928],{"class":437},"  runtimeConfig",[253,930,515],{"class":263},[253,932,417],{"class":263},[253,934,935,938,940],{"class":255,"line":381},[253,936,937],{"class":437},"    betterStack",[253,939,515],{"class":263},[253,941,417],{"class":263},[253,943,944,947,949,952,954],{"class":255,"line":388},[253,945,946],{"class":437},"      sourceToken",[253,948,515],{"class":263},[253,950,951],{"class":263}," ''",[253,953,448],{"class":263},[253,955,956],{"class":358}," // Set via NUXT_BETTER_STACK_SOURCE_TOKEN\n",[253,958,959],{"class":255,"line":420},[253,960,961],{"class":263},"    },\n",[253,963,964],{"class":255,"line":456},[253,965,966],{"class":263},"  },\n",[253,968,970,972],{"class":255,"line":969},7,[253,971,459],{"class":263},[253,973,462],{"class":267},[289,975,977],{"id":976},"override-options","Override Options",[226,979,980],{},"Pass options directly to override any configuration:",[243,982,984],{"className":245,"code":983,"language":247,"meta":248,"style":248},"const drain = createBetterStackDrain({\n  sourceToken: 'my-token',\n  timeout: 10000,\n})\n",[250,985,986,1002,1019,1032],{"__ignoreMap":248},[253,987,988,991,994,996,998,1000],{"class":255,"line":256},[253,989,990],{"class":413},"const",[253,992,993],{"class":267}," drain ",[253,995,337],{"class":263},[253,997,268],{"class":397},[253,999,401],{"class":267},[253,1001,923],{"class":263},[253,1003,1004,1007,1009,1011,1014,1016],{"class":255,"line":362},[253,1005,1006],{"class":437},"  sourceToken",[253,1008,515],{"class":263},[253,1010,277],{"class":263},[253,1012,1013],{"class":280},"my-token",[253,1015,440],{"class":263},[253,1017,1018],{"class":263},",\n",[253,1020,1021,1024,1026,1030],{"class":255,"line":381},[253,1022,1023],{"class":437},"  timeout",[253,1025,515],{"class":263},[253,1027,1029],{"class":1028},"sbssI"," 10000",[253,1031,1018],{"class":263},[253,1033,1034,1036],{"class":255,"line":388},[253,1035,459],{"class":263},[253,1037,462],{"class":267},[289,1039,1041],{"id":1040},"full-configuration-reference","Full Configuration Reference",[843,1043,1044,1059],{},[846,1045,1046],{},[849,1047,1048,1051,1054,1057],{},[852,1049,1050],{},"Option",[852,1052,1053],{},"Type",[852,1055,1056],{},"Default",[852,1058,860],{},[862,1060,1061,1078,1097],{},[849,1062,1063,1068,1073,1076],{},[867,1064,1065],{},[250,1066,1067],{},"sourceToken",[867,1069,1070],{},[250,1071,1072],{},"string",[867,1074,1075],{},"-",[867,1077,878],{},[849,1079,1080,1085,1089,1094],{},[867,1081,1082],{},[250,1083,1084],{},"endpoint",[867,1086,1087],{},[250,1088,1072],{},[867,1090,1091],{},[250,1092,1093],{},"https://in.logs.betterstack.com",[867,1095,1096],{},"Ingestion endpoint",[849,1098,1099,1104,1109,1114],{},[867,1100,1101],{},[250,1102,1103],{},"timeout",[867,1105,1106],{},[250,1107,1108],{},"number",[867,1110,1111],{},[250,1112,1113],{},"5000",[867,1115,1116],{},"Request timeout in milliseconds",[236,1118,1120],{"id":1119},"log-transformation","Log Transformation",[226,1122,1123,1124,515],{},"evlog wide events are transformed using ",[250,1125,1126],{},"toBetterStackEvent()",[1128,1129,1130,1144],"ul",{},[297,1131,1132,1135,1136,1139,1140,1143],{},[308,1133,1134],{},"Timestamp",": ",[250,1137,1138],{},"timestamp"," is mapped to ",[250,1141,1142],{},"dt"," (Better Stack's expected ISO-8601 timestamp field)",[297,1145,1146,1149],{},[308,1147,1148],{},"All other fields",": Spread as-is into the event body",[226,1151,1152],{},"Better Stack accepts arbitrary JSON fields, so all your wide event context (level, service, action, user data, etc.) is automatically searchable.",[236,1154,1156],{"id":1155},"querying-logs-in-better-stack","Querying Logs in Better Stack",[226,1158,1159],{},"Better Stack provides a powerful log search interface:",[1128,1161,1162,1168,1174,1188,1194],{},[297,1163,1164,1167],{},[308,1165,1166],{},"Live tail",": Stream logs in real time",[297,1169,1170,1173],{},[308,1171,1172],{},"Full-text search",": Search across all fields",[297,1175,1176,1179,1180,1183,1184,1187],{},[308,1177,1178],{},"Structured queries",": Filter by ",[250,1181,1182],{},"level:error",", ",[250,1185,1186],{},"service:my-app",", or any wide event field",[297,1189,1190,1193],{},[308,1191,1192],{},"Dashboards",": Create custom dashboards from your wide event data",[297,1195,1196,1199],{},[308,1197,1198],{},"Alerts",": Set up alerts based on log patterns or thresholds",[236,1201,1203],{"id":1202},"troubleshooting","Troubleshooting",[289,1205,1207],{"id":1206},"missing-source-token-error","Missing source token error",[243,1209,1214],{"className":1210,"code":1212,"language":1213},[1211],"language-text","[evlog/better-stack] Missing source token. Set BETTER_STACK_SOURCE_TOKEN env var or pass to createBetterStackDrain()\n","text",[250,1215,1212],{"__ignoreMap":248},[226,1217,1218],{},"Make sure your environment variable is set and the server was restarted after adding it.",[289,1220,1222],{"id":1221},"_401-unauthorized","401 Unauthorized",[226,1224,1225,1226,1228],{},"Your source token may be invalid or revoked. Generate a new source token in ",[308,1227,310],{}," in the Better Stack dashboard.",[289,1230,1232],{"id":1231},"_403-forbidden","403 Forbidden",[226,1234,1235],{},"The source may be archived or deleted. Create a new source in Better Stack.",[236,1237,1239],{"id":1238},"direct-api-usage","Direct API Usage",[226,1241,1242],{},"For advanced use cases, you can use the lower-level functions:",[243,1244,1247],{"className":245,"code":1245,"filename":1246,"language":247,"meta":248,"style":248},"import { sendToBetterStack, sendBatchToBetterStack } from 'evlog/better-stack'\n\n// Send a single event\nawait sendToBetterStack(event, {\n  sourceToken: process.env.BETTER_STACK_SOURCE_TOKEN!,\n})\n\n// Send multiple events in one request\nawait sendBatchToBetterStack(events, {\n  sourceToken: process.env.BETTER_STACK_SOURCE_TOKEN!,\n})\n","server/utils/better-stack.ts",[250,1248,1249,1273,1277,1282,1295,1316,1322,1326,1332,1346,1365],{"__ignoreMap":248},[253,1250,1251,1253,1255,1258,1260,1263,1265,1267,1269,1271],{"class":255,"line":256},[253,1252,260],{"class":259},[253,1254,264],{"class":263},[253,1256,1257],{"class":267}," sendToBetterStack",[253,1259,448],{"class":263},[253,1261,1262],{"class":267}," sendBatchToBetterStack",[253,1264,271],{"class":263},[253,1266,274],{"class":259},[253,1268,277],{"class":263},[253,1270,281],{"class":280},[253,1272,284],{"class":263},[253,1274,1275],{"class":255,"line":362},[253,1276,385],{"emptyLinePlaceholder":384},[253,1278,1279],{"class":255,"line":381},[253,1280,1281],{"class":358},"// Send a single event\n",[253,1283,1284,1286,1288,1291,1293],{"class":255,"line":388},[253,1285,611],{"class":259},[253,1287,1257],{"class":397},[253,1289,1290],{"class":267},"(event",[253,1292,448],{"class":263},[253,1294,417],{"class":263},[253,1296,1297,1299,1301,1304,1306,1309,1311,1313],{"class":255,"line":420},[253,1298,1006],{"class":437},[253,1300,515],{"class":263},[253,1302,1303],{"class":267}," process",[253,1305,426],{"class":263},[253,1307,1308],{"class":267},"env",[253,1310,426],{"class":263},[253,1312,334],{"class":267},[253,1314,1315],{"class":263},"!,\n",[253,1317,1318,1320],{"class":255,"line":456},[253,1319,459],{"class":263},[253,1321,462],{"class":267},[253,1323,1324],{"class":255,"line":969},[253,1325,385],{"emptyLinePlaceholder":384},[253,1327,1329],{"class":255,"line":1328},8,[253,1330,1331],{"class":358},"// Send multiple events in one request\n",[253,1333,1335,1337,1339,1342,1344],{"class":255,"line":1334},9,[253,1336,611],{"class":259},[253,1338,1262],{"class":397},[253,1340,1341],{"class":267},"(events",[253,1343,448],{"class":263},[253,1345,417],{"class":263},[253,1347,1349,1351,1353,1355,1357,1359,1361,1363],{"class":255,"line":1348},10,[253,1350,1006],{"class":437},[253,1352,515],{"class":263},[253,1354,1303],{"class":267},[253,1356,426],{"class":263},[253,1358,1308],{"class":267},[253,1360,426],{"class":263},[253,1362,334],{"class":267},[253,1364,1315],{"class":263},[253,1366,1368,1370],{"class":255,"line":1367},11,[253,1369,459],{"class":263},[253,1371,462],{"class":267},[236,1373,1375],{"id":1374},"next-steps","Next Steps",[1128,1377,1378,1384,1390],{},[297,1379,1380,1383],{},[229,1381,1382],{"href":150},"Axiom Adapter"," - Send logs to Axiom for querying and dashboards",[297,1385,1386,1389],{},[229,1387,1388],{"href":155},"OTLP Adapter"," - Send logs via OpenTelemetry Protocol",[297,1391,1392,1394],{},[229,1393,174],{"href":175}," - Build your own adapter",[1396,1397,1398],"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":248,"searchDepth":362,"depth":362,"links":1400},[1401,1402,1407,1413,1414,1415,1420,1421],{"id":238,"depth":362,"text":15},{"id":287,"depth":362,"text":20,"children":1403},[1404,1405,1406],{"id":291,"depth":381,"text":292},{"id":320,"depth":381,"text":321},{"id":343,"depth":381,"text":344},{"id":799,"depth":362,"text":800,"children":1408},[1409,1410,1411,1412],{"id":840,"depth":381,"text":841},{"id":896,"depth":381,"text":897},{"id":976,"depth":381,"text":977},{"id":1040,"depth":381,"text":1041},{"id":1119,"depth":362,"text":1120},{"id":1155,"depth":362,"text":1156},{"id":1202,"depth":362,"text":1203,"children":1416},[1417,1418,1419],{"id":1206,"depth":381,"text":1207},{"id":1221,"depth":381,"text":1222},{"id":1231,"depth":381,"text":1232},{"id":1238,"depth":362,"text":1239},{"id":1374,"depth":362,"text":1375},"Send wide events to Better Stack (formerly Logtail) for log management, alerting, and dashboards. Zero-config setup with environment variables.","md",[1425,1432],{"label":1426,"icon":1427,"to":1428,"target":1429,"color":1430,"variant":1431},"Better Stack Dashboard","i-lucide-external-link","https://logs.betterstack.com","_blank","neutral","subtle",{"label":1382,"icon":152,"to":150,"color":1430,"variant":1431},{},{"title":169,"icon":172},{"title":221,"description":1422},"odZEsQE9Xtt3UVOAmaRcdfS3_8bbnmYQ5AwNAEaNU2s",[1438,1440],{"title":164,"path":165,"stem":166,"description":1439,"icon":167,"children":-1},"Send structured logs to Sentry Logs for high-cardinality querying and debugging. Zero-config setup with environment variables.",{"title":174,"path":175,"stem":176,"description":1441,"icon":177,"children":-1},"Build your own adapter to send logs to any destination. Factory patterns, batching, filtering, and error handling best practices.",1773097848733]