[{"data":1,"prerenderedAt":2382},["ShallowReactive",2],{"navigation_docs":3,"-adapters-posthog":238,"-adapters-posthog-surround":2377},[4,30,110,154,208,224],{"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},"Frameworks","\u002Fframeworks","2.frameworks",[35,40,45,50,55,60,65,70,75,80,85,90,95,100,105],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Fframeworks\u002Foverview","2.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":41,"path":42,"stem":43,"icon":44},"Nuxt","\u002Fframeworks\u002Fnuxt","2.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":46,"path":47,"stem":48,"icon":49},"Next.js","\u002Fframeworks\u002Fnextjs","2.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":51,"path":52,"stem":53,"icon":54},"SvelteKit","\u002Fframeworks\u002Fsveltekit","2.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":56,"path":57,"stem":58,"icon":59},"Nitro","\u002Fframeworks\u002Fnitro","2.frameworks\u002F04.nitro","i-custom-nitro",{"title":61,"path":62,"stem":63,"icon":64},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","2.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":66,"path":67,"stem":68,"icon":69},"NestJS","\u002Fframeworks\u002Fnestjs","2.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":71,"path":72,"stem":73,"icon":74},"Express","\u002Fframeworks\u002Fexpress","2.frameworks\u002F07.express","i-simple-icons-express",{"title":76,"path":77,"stem":78,"icon":79},"Hono","\u002Fframeworks\u002Fhono","2.frameworks\u002F08.hono","i-simple-icons-hono",{"title":81,"path":82,"stem":83,"icon":84},"Fastify","\u002Fframeworks\u002Ffastify","2.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":86,"path":87,"stem":88,"icon":89},"Elysia","\u002Fframeworks\u002Felysia","2.frameworks\u002F10.elysia","i-custom-elysia",{"title":91,"path":92,"stem":93,"icon":94},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","2.frameworks\u002F11.cloudflare-workers","i-simple-icons-cloudflare",{"title":96,"path":97,"stem":98,"icon":99},"Standalone","\u002Fframeworks\u002Fstandalone","2.frameworks\u002F12.standalone","i-simple-icons-typescript",{"title":101,"path":102,"stem":103,"icon":104},"Astro","\u002Fframeworks\u002Fastro","2.frameworks\u002F13.astro","i-simple-icons-astro",{"title":106,"path":107,"stem":108,"icon":109},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","2.frameworks\u002F14.custom-integration","i-lucide-puzzle",{"title":111,"path":112,"stem":113,"children":114,"page":29},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[115,120,125,130,135,139,144,149],{"title":116,"path":117,"stem":118,"icon":119},"Request Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":121,"path":122,"stem":123,"icon":124},"Wide Events","\u002Fcore-concepts\u002Fwide-events","3.core-concepts\u002F1.wide-events","i-lucide-layers",{"title":126,"path":127,"stem":128,"icon":129},"Structured Errors","\u002Fcore-concepts\u002Fstructured-errors","3.core-concepts\u002F2.structured-errors","i-lucide-shield-alert",{"title":131,"path":132,"stem":133,"icon":134},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F3.best-practices","i-lucide-shield-check",{"title":136,"path":137,"stem":138,"icon":99},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F4.typed-fields",{"title":140,"path":141,"stem":142,"icon":143},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F5.sampling","i-lucide-filter",{"title":145,"path":146,"stem":147,"icon":148},"Client Logging","\u002Fcore-concepts\u002Fclient-logging","3.core-concepts\u002F6.client-logging","i-lucide-monitor",{"title":150,"path":151,"stem":152,"icon":153},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F7.configuration","i-lucide-settings",{"title":155,"path":156,"stem":157,"children":158,"page":29},"Adapters","\u002Fadapters","4.adapters",[159,163,168,173,178,183,188,193,198,203],{"title":36,"path":160,"stem":161,"icon":162},"\u002Fadapters\u002Foverview","4.adapters\u002F1.overview","i-custom-plug",{"title":164,"path":165,"stem":166,"icon":167},"Browser","\u002Fadapters\u002Fbrowser","4.adapters\u002F10.browser","i-lucide-globe",{"title":169,"path":170,"stem":171,"icon":172},"Axiom","\u002Fadapters\u002Faxiom","4.adapters\u002F2.axiom","i-custom-axiom",{"title":174,"path":175,"stem":176,"icon":177},"OTLP","\u002Fadapters\u002Fotlp","4.adapters\u002F3.otlp","i-simple-icons-opentelemetry",{"title":179,"path":180,"stem":181,"icon":182},"PostHog","\u002Fadapters\u002Fposthog","4.adapters\u002F4.posthog","i-simple-icons-posthog",{"title":184,"path":185,"stem":186,"icon":187},"Sentry","\u002Fadapters\u002Fsentry","4.adapters\u002F5.sentry","i-simple-icons-sentry",{"title":189,"path":190,"stem":191,"icon":192},"Better Stack","\u002Fadapters\u002Fbetter-stack","4.adapters\u002F6.better-stack","i-simple-icons-betterstack",{"title":194,"path":195,"stem":196,"icon":197},"File System","\u002Fadapters\u002Ffs","4.adapters\u002F7.fs","i-lucide-hard-drive",{"title":199,"path":200,"stem":201,"icon":202},"Custom Adapters","\u002Fadapters\u002Fcustom","4.adapters\u002F8.custom","i-lucide-code",{"title":204,"path":205,"stem":206,"icon":207},"Pipeline","\u002Fadapters\u002Fpipeline","4.adapters\u002F9.pipeline","i-lucide-workflow",{"title":209,"path":210,"stem":211,"children":212,"page":29},"Enrichers","\u002Fenrichers","5.enrichers",[213,216,220],{"title":36,"path":214,"stem":215,"icon":28},"\u002Fenrichers\u002Foverview","5.enrichers\u002F1.overview",{"title":217,"path":218,"stem":219,"icon":109},"Built-in","\u002Fenrichers\u002Fbuilt-in","5.enrichers\u002F2.built-in",{"title":221,"path":222,"stem":223,"icon":202},"Custom","\u002Fenrichers\u002Fcustom","5.enrichers\u002F3.custom",{"title":225,"path":226,"stem":227,"children":228,"page":29},"NuxtHub","\u002Fnuxthub","6.nuxthub",[229,233],{"title":36,"path":230,"stem":231,"icon":232},"\u002Fnuxthub\u002Foverview","6.nuxthub\u002F1.overview","i-lucide-database",{"title":234,"path":235,"stem":236,"icon":237},"Retention","\u002Fnuxthub\u002Fretention","6.nuxthub\u002F2.retention","i-lucide-clock",{"id":239,"title":240,"body":241,"description":2363,"extension":2364,"links":2365,"meta":2373,"navigation":2374,"path":180,"seo":2375,"stem":181,"__hash__":2376},"docs\u002F4.adapters\u002F4.posthog.md","PostHog Adapter",{"type":242,"value":243,"toc":2333},"minimark",[244,260,348,352,355,392,395,400,433,437,456,460,901,904,907,910,944,948,1002,1006,1013,1095,1099,1102,1159,1163,1239,1243,1253,1285,1289,1295,1335,1363,1367,1374,1387,1391,1397,1477,1491,1499,1503,1607,1611,1614,1702,1706,1712,1738,1742,1817,1820,1947,1951,1955,1963,1966,1970,1973,1993,1997,2003,2016,2020,2023,2139,2142,2301,2305,2329],[245,246,247,253,254,259],"p",{},[248,249,179],"a",{"href":250,"rel":251},"https:\u002F\u002Fposthog.com",[252],"nofollow"," is an open-source product analytics platform. The evlog PostHog adapter sends your wide events to ",[248,255,258],{"href":256,"rel":257},"https:\u002F\u002Fposthog.com\u002Fdocs\u002Flogs",[252],"PostHog Logs"," via the standard OTLP format, giving you a dedicated log viewer with filtering, search, and tail mode using your existing PostHog API key.",[261,262,263],"code-collapse",{},[264,265,271],"pre",{"className":266,"code":267,"filename":268,"language":269,"meta":270,"style":270},"language-txt shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Add the PostHog drain adapter to send evlog wide events to PostHog Logs.\n\n1. Identify which framework I'm using and follow its evlog integration pattern\n2. Install evlog if not already installed\n3. Import createPostHogDrain from 'evlog\u002Fposthog'\n4. Wire createPostHogDrain() into my framework's drain configuration\n5. Set POSTHOG_API_KEY environment variable\n6. Optionally set POSTHOG_HOST for EU or self-hosted instances\n7. Test by triggering a request and checking PostHog > Logs\n\nAdapter docs: https:\u002F\u002Fwww.evlog.dev\u002Fadapters\u002Fposthog\nFramework setup: https:\u002F\u002Fwww.evlog.dev\u002Fframeworks\n","Prompt","txt","",[272,273,274,282,289,295,301,307,313,319,325,331,336,342],"code",{"__ignoreMap":270},[275,276,279],"span",{"class":277,"line":278},"line",1,[275,280,281],{},"Add the PostHog drain adapter to send evlog wide events to PostHog Logs.\n",[275,283,285],{"class":277,"line":284},2,[275,286,288],{"emptyLinePlaceholder":287},true,"\n",[275,290,292],{"class":277,"line":291},3,[275,293,294],{},"1. Identify which framework I'm using and follow its evlog integration pattern\n",[275,296,298],{"class":277,"line":297},4,[275,299,300],{},"2. Install evlog if not already installed\n",[275,302,304],{"class":277,"line":303},5,[275,305,306],{},"3. Import createPostHogDrain from 'evlog\u002Fposthog'\n",[275,308,310],{"class":277,"line":309},6,[275,311,312],{},"4. Wire createPostHogDrain() into my framework's drain configuration\n",[275,314,316],{"class":277,"line":315},7,[275,317,318],{},"5. Set POSTHOG_API_KEY environment variable\n",[275,320,322],{"class":277,"line":321},8,[275,323,324],{},"6. Optionally set POSTHOG_HOST for EU or self-hosted instances\n",[275,326,328],{"class":277,"line":327},9,[275,329,330],{},"7. Test by triggering a request and checking PostHog > Logs\n",[275,332,334],{"class":277,"line":333},10,[275,335,288],{"emptyLinePlaceholder":287},[275,337,339],{"class":277,"line":338},11,[275,340,341],{},"Adapter docs: https:\u002F\u002Fwww.evlog.dev\u002Fadapters\u002Fposthog\n",[275,343,345],{"class":277,"line":344},12,[275,346,347],{},"Framework setup: https:\u002F\u002Fwww.evlog.dev\u002Fframeworks\n",[349,350,15],"h2",{"id":351},"installation",[245,353,354],{},"The PostHog adapter comes bundled with evlog:",[264,356,360],{"className":357,"code":358,"language":359,"meta":270,"style":270},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createPostHogDrain } from 'evlog\u002Fposthog'\n","typescript",[272,361,362],{"__ignoreMap":270},[275,363,364,368,372,376,379,382,385,389],{"class":277,"line":278},[275,365,367],{"class":366},"s7zQu","import",[275,369,371],{"class":370},"sMK4o"," {",[275,373,375],{"class":374},"sTEyZ"," createPostHogDrain",[275,377,378],{"class":370}," }",[275,380,381],{"class":366}," from",[275,383,384],{"class":370}," '",[275,386,388],{"class":387},"sfazB","evlog\u002Fposthog",[275,390,391],{"class":370},"'\n",[349,393,20],{"id":394},"quick-start",[396,397,399],"h3",{"id":398},"_1-get-your-posthog-project-api-key","1. Get your PostHog project API key",[401,402,403,412,426],"ol",{},[404,405,406,407],"li",{},"Log in to your ",[248,408,411],{"href":409,"rel":410},"https:\u002F\u002Fapp.posthog.com",[252],"PostHog dashboard",[404,413,414,415,419,420,419,423],{},"Go to ",[416,417,418],"strong",{},"Settings"," > ",[416,421,422],{},"Project",[416,424,425],{},"Project API Key",[404,427,428,429,432],{},"Copy the key (starts with ",[272,430,431],{},"phc_",")",[396,434,436],{"id":435},"_2-set-environment-variables","2. Set environment variables",[264,438,443],{"className":439,"code":440,"filename":441,"language":442,"meta":270,"style":270},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","POSTHOG_API_KEY=phc_your-project-api-key\n",".env","bash",[272,444,445],{"__ignoreMap":270},[275,446,447,450,453],{"class":277,"line":278},[275,448,449],{"class":374},"POSTHOG_API_KEY",[275,451,452],{"class":370},"=",[275,454,455],{"class":387},"phc_your-project-api-key\n",[396,457,459],{"id":458},"_3-wire-the-drain-to-your-framework","3. Wire the drain to your framework",[461,462,463,570,633,687,746,800,853],"code-group",{},[264,464,467],{"className":357,"code":465,"filename":466,"language":359,"meta":270,"style":270},"\u002F\u002F server\u002Fplugins\u002Fevlog-drain.ts\nimport { createPostHogDrain } from 'evlog\u002Fposthog'\n\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('evlog:drain', createPostHogDrain())\n})\n","Nuxt \u002F Nitro",[272,468,469,475,493,497,527,562],{"__ignoreMap":270},[275,470,471],{"class":277,"line":278},[275,472,474],{"class":473},"sHwdD","\u002F\u002F server\u002Fplugins\u002Fevlog-drain.ts\n",[275,476,477,479,481,483,485,487,489,491],{"class":277,"line":284},[275,478,367],{"class":366},[275,480,371],{"class":370},[275,482,375],{"class":374},[275,484,378],{"class":370},[275,486,381],{"class":366},[275,488,384],{"class":370},[275,490,388],{"class":387},[275,492,391],{"class":370},[275,494,495],{"class":277,"line":291},[275,496,288],{"emptyLinePlaceholder":287},[275,498,499,502,505,509,512,514,518,520,524],{"class":277,"line":297},[275,500,501],{"class":366},"export",[275,503,504],{"class":366}," default",[275,506,508],{"class":507},"s2Zo4"," defineNitroPlugin",[275,510,511],{"class":374},"(",[275,513,511],{"class":370},[275,515,517],{"class":516},"sHdIc","nitroApp",[275,519,432],{"class":370},[275,521,523],{"class":522},"spNyl"," =>",[275,525,526],{"class":370}," {\n",[275,528,529,532,535,538,540,543,546,549,552,554,557,559],{"class":277,"line":303},[275,530,531],{"class":374},"  nitroApp",[275,533,534],{"class":370},".",[275,536,537],{"class":374},"hooks",[275,539,534],{"class":370},[275,541,542],{"class":507},"hook",[275,544,511],{"class":545},"swJcz",[275,547,548],{"class":370},"'",[275,550,551],{"class":387},"evlog:drain",[275,553,548],{"class":370},[275,555,556],{"class":370},",",[275,558,375],{"class":507},[275,560,561],{"class":545},"())\n",[275,563,564,567],{"class":277,"line":309},[275,565,566],{"class":370},"}",[275,568,569],{"class":374},")\n",[264,571,573],{"className":357,"code":572,"filename":76,"language":359,"meta":270,"style":270},"import { createPostHogDrain } from 'evlog\u002Fposthog'\n\napp.use(evlog({ drain: createPostHogDrain() }))\n",[272,574,575,593,597],{"__ignoreMap":270},[275,576,577,579,581,583,585,587,589,591],{"class":277,"line":278},[275,578,367],{"class":366},[275,580,371],{"class":370},[275,582,375],{"class":374},[275,584,378],{"class":370},[275,586,381],{"class":366},[275,588,384],{"class":370},[275,590,388],{"class":387},[275,592,391],{"class":370},[275,594,595],{"class":277,"line":284},[275,596,288],{"emptyLinePlaceholder":287},[275,598,599,602,604,607,609,612,614,617,620,623,625,628,630],{"class":277,"line":291},[275,600,601],{"class":374},"app",[275,603,534],{"class":370},[275,605,606],{"class":507},"use",[275,608,511],{"class":374},[275,610,611],{"class":507},"evlog",[275,613,511],{"class":374},[275,615,616],{"class":370},"{",[275,618,619],{"class":545}," drain",[275,621,622],{"class":370},":",[275,624,375],{"class":507},[275,626,627],{"class":374},"() ",[275,629,566],{"class":370},[275,631,632],{"class":374},"))\n",[264,634,635],{"className":357,"code":572,"filename":71,"language":359,"meta":270,"style":270},[272,636,637,655,659],{"__ignoreMap":270},[275,638,639,641,643,645,647,649,651,653],{"class":277,"line":278},[275,640,367],{"class":366},[275,642,371],{"class":370},[275,644,375],{"class":374},[275,646,378],{"class":370},[275,648,381],{"class":366},[275,650,384],{"class":370},[275,652,388],{"class":387},[275,654,391],{"class":370},[275,656,657],{"class":277,"line":284},[275,658,288],{"emptyLinePlaceholder":287},[275,660,661,663,665,667,669,671,673,675,677,679,681,683,685],{"class":277,"line":291},[275,662,601],{"class":374},[275,664,534],{"class":370},[275,666,606],{"class":507},[275,668,511],{"class":374},[275,670,611],{"class":507},[275,672,511],{"class":374},[275,674,616],{"class":370},[275,676,619],{"class":545},[275,678,622],{"class":370},[275,680,375],{"class":507},[275,682,627],{"class":374},[275,684,566],{"class":370},[275,686,632],{"class":374},[264,688,690],{"className":357,"code":689,"filename":81,"language":359,"meta":270,"style":270},"import { createPostHogDrain } from 'evlog\u002Fposthog'\n\nawait app.register(evlog, { drain: createPostHogDrain() })\n",[272,691,692,710,714],{"__ignoreMap":270},[275,693,694,696,698,700,702,704,706,708],{"class":277,"line":278},[275,695,367],{"class":366},[275,697,371],{"class":370},[275,699,375],{"class":374},[275,701,378],{"class":370},[275,703,381],{"class":366},[275,705,384],{"class":370},[275,707,388],{"class":387},[275,709,391],{"class":370},[275,711,712],{"class":277,"line":284},[275,713,288],{"emptyLinePlaceholder":287},[275,715,716,719,722,724,727,730,732,734,736,738,740,742,744],{"class":277,"line":291},[275,717,718],{"class":366},"await",[275,720,721],{"class":374}," app",[275,723,534],{"class":370},[275,725,726],{"class":507},"register",[275,728,729],{"class":374},"(evlog",[275,731,556],{"class":370},[275,733,371],{"class":370},[275,735,619],{"class":545},[275,737,622],{"class":370},[275,739,375],{"class":507},[275,741,627],{"class":374},[275,743,566],{"class":370},[275,745,569],{"class":374},[264,747,748],{"className":357,"code":572,"filename":86,"language":359,"meta":270,"style":270},[272,749,750,768,772],{"__ignoreMap":270},[275,751,752,754,756,758,760,762,764,766],{"class":277,"line":278},[275,753,367],{"class":366},[275,755,371],{"class":370},[275,757,375],{"class":374},[275,759,378],{"class":370},[275,761,381],{"class":366},[275,763,384],{"class":370},[275,765,388],{"class":387},[275,767,391],{"class":370},[275,769,770],{"class":277,"line":284},[275,771,288],{"emptyLinePlaceholder":287},[275,773,774,776,778,780,782,784,786,788,790,792,794,796,798],{"class":277,"line":291},[275,775,601],{"class":374},[275,777,534],{"class":370},[275,779,606],{"class":507},[275,781,511],{"class":374},[275,783,611],{"class":507},[275,785,511],{"class":374},[275,787,616],{"class":370},[275,789,619],{"class":545},[275,791,622],{"class":370},[275,793,375],{"class":507},[275,795,627],{"class":374},[275,797,566],{"class":370},[275,799,632],{"class":374},[264,801,803],{"className":357,"code":802,"filename":66,"language":359,"meta":270,"style":270},"import { createPostHogDrain } from 'evlog\u002Fposthog'\n\nEvlogModule.forRoot({ drain: createPostHogDrain() })\n",[272,804,805,823,827],{"__ignoreMap":270},[275,806,807,809,811,813,815,817,819,821],{"class":277,"line":278},[275,808,367],{"class":366},[275,810,371],{"class":370},[275,812,375],{"class":374},[275,814,378],{"class":370},[275,816,381],{"class":366},[275,818,384],{"class":370},[275,820,388],{"class":387},[275,822,391],{"class":370},[275,824,825],{"class":277,"line":284},[275,826,288],{"emptyLinePlaceholder":287},[275,828,829,832,834,837,839,841,843,845,847,849,851],{"class":277,"line":291},[275,830,831],{"class":374},"EvlogModule",[275,833,534],{"class":370},[275,835,836],{"class":507},"forRoot",[275,838,511],{"class":374},[275,840,616],{"class":370},[275,842,619],{"class":545},[275,844,622],{"class":370},[275,846,375],{"class":507},[275,848,627],{"class":374},[275,850,566],{"class":370},[275,852,569],{"class":374},[264,854,856],{"className":357,"code":855,"filename":96,"language":359,"meta":270,"style":270},"import { createPostHogDrain } from 'evlog\u002Fposthog'\n\ninitLogger({ drain: createPostHogDrain() })\n",[272,857,858,876,880],{"__ignoreMap":270},[275,859,860,862,864,866,868,870,872,874],{"class":277,"line":278},[275,861,367],{"class":366},[275,863,371],{"class":370},[275,865,375],{"class":374},[275,867,378],{"class":370},[275,869,381],{"class":366},[275,871,384],{"class":370},[275,873,388],{"class":387},[275,875,391],{"class":370},[275,877,878],{"class":277,"line":284},[275,879,288],{"emptyLinePlaceholder":287},[275,881,882,885,887,889,891,893,895,897,899],{"class":277,"line":291},[275,883,884],{"class":507},"initLogger",[275,886,511],{"class":374},[275,888,616],{"class":370},[275,890,619],{"class":545},[275,892,622],{"class":370},[275,894,375],{"class":507},[275,896,627],{"class":374},[275,898,566],{"class":370},[275,900,569],{"class":374},[245,902,903],{},"That's it! Your wide events will now appear in PostHog Logs with full OTLP structure including severity levels, trace context, and structured attributes.",[349,905,150],{"id":906},"configuration",[245,908,909],{},"The adapter reads configuration from multiple sources (highest priority first):",[401,911,912,921,931],{},[404,913,914,917,918],{},[416,915,916],{},"Overrides"," passed to ",[272,919,920],{},"createPostHogDrain()",[404,922,923,926,927,930],{},[416,924,925],{},"Runtime config"," at ",[272,928,929],{},"runtimeConfig.posthog"," (Nuxt\u002FNitro only)",[404,932,933,936,937,940,941,432],{},[416,934,935],{},"Environment variables"," (",[272,938,939],{},"POSTHOG_*"," or ",[272,942,943],{},"NUXT_POSTHOG_*",[396,945,947],{"id":946},"environment-variables","Environment Variables",[949,950,951,967],"table",{},[952,953,954],"thead",{},[955,956,957,961,964],"tr",{},[958,959,960],"th",{},"Variable",[958,962,963],{},"Nuxt alias",[958,965,966],{},"Description",[968,969,970,987],"tbody",{},[955,971,972,977,982],{},[973,974,975],"td",{},[272,976,449],{},[973,978,979],{},[272,980,981],{},"NUXT_POSTHOG_API_KEY",[973,983,984,985,432],{},"Project API key (starts with ",[272,986,431],{},[955,988,989,994,999],{},[973,990,991],{},[272,992,993],{},"POSTHOG_HOST",[973,995,996],{},[272,997,998],{},"NUXT_POSTHOG_HOST",[973,1000,1001],{},"PostHog host URL (for EU or self-hosted)",[396,1003,1005],{"id":1004},"runtime-config-nuxt-only","Runtime Config (Nuxt only)",[245,1007,1008,1009,1012],{},"Configure via ",[272,1010,1011],{},"nuxt.config.ts"," for type-safe configuration:",[264,1014,1016],{"className":357,"code":1015,"filename":1011,"language":359,"meta":270,"style":270},"export default defineNuxtConfig({\n  runtimeConfig: {\n    posthog: {\n      apiKey: '', \u002F\u002F Set via NUXT_POSTHOG_API_KEY\n      host: '', \u002F\u002F Set via NUXT_POSTHOG_HOST\n    },\n  },\n})\n",[272,1017,1018,1032,1041,1050,1065,1079,1084,1089],{"__ignoreMap":270},[275,1019,1020,1022,1024,1027,1029],{"class":277,"line":278},[275,1021,501],{"class":366},[275,1023,504],{"class":366},[275,1025,1026],{"class":507}," defineNuxtConfig",[275,1028,511],{"class":374},[275,1030,1031],{"class":370},"{\n",[275,1033,1034,1037,1039],{"class":277,"line":284},[275,1035,1036],{"class":545},"  runtimeConfig",[275,1038,622],{"class":370},[275,1040,526],{"class":370},[275,1042,1043,1046,1048],{"class":277,"line":291},[275,1044,1045],{"class":545},"    posthog",[275,1047,622],{"class":370},[275,1049,526],{"class":370},[275,1051,1052,1055,1057,1060,1062],{"class":277,"line":297},[275,1053,1054],{"class":545},"      apiKey",[275,1056,622],{"class":370},[275,1058,1059],{"class":370}," ''",[275,1061,556],{"class":370},[275,1063,1064],{"class":473}," \u002F\u002F Set via NUXT_POSTHOG_API_KEY\n",[275,1066,1067,1070,1072,1074,1076],{"class":277,"line":303},[275,1068,1069],{"class":545},"      host",[275,1071,622],{"class":370},[275,1073,1059],{"class":370},[275,1075,556],{"class":370},[275,1077,1078],{"class":473}," \u002F\u002F Set via NUXT_POSTHOG_HOST\n",[275,1080,1081],{"class":277,"line":309},[275,1082,1083],{"class":370},"    },\n",[275,1085,1086],{"class":277,"line":315},[275,1087,1088],{"class":370},"  },\n",[275,1090,1091,1093],{"class":277,"line":321},[275,1092,566],{"class":370},[275,1094,569],{"class":374},[396,1096,1098],{"id":1097},"override-options","Override Options",[245,1100,1101],{},"Pass options directly to override any configuration:",[264,1103,1105],{"className":357,"code":1104,"language":359,"meta":270,"style":270},"const drain = createPostHogDrain({\n  host: 'https:\u002F\u002Feu.i.posthog.com',\n  timeout: 10000,\n})\n",[272,1106,1107,1123,1140,1153],{"__ignoreMap":270},[275,1108,1109,1112,1115,1117,1119,1121],{"class":277,"line":278},[275,1110,1111],{"class":522},"const",[275,1113,1114],{"class":374}," drain ",[275,1116,452],{"class":370},[275,1118,375],{"class":507},[275,1120,511],{"class":374},[275,1122,1031],{"class":370},[275,1124,1125,1128,1130,1132,1135,1137],{"class":277,"line":284},[275,1126,1127],{"class":545},"  host",[275,1129,622],{"class":370},[275,1131,384],{"class":370},[275,1133,1134],{"class":387},"https:\u002F\u002Feu.i.posthog.com",[275,1136,548],{"class":370},[275,1138,1139],{"class":370},",\n",[275,1141,1142,1145,1147,1151],{"class":277,"line":291},[275,1143,1144],{"class":545},"  timeout",[275,1146,622],{"class":370},[275,1148,1150],{"class":1149},"sbssI"," 10000",[275,1152,1139],{"class":370},[275,1154,1155,1157],{"class":277,"line":297},[275,1156,566],{"class":370},[275,1158,569],{"class":374},[396,1160,1162],{"id":1161},"full-configuration-reference","Full Configuration Reference",[949,1164,1165,1180],{},[952,1166,1167],{},[955,1168,1169,1172,1175,1178],{},[958,1170,1171],{},"Option",[958,1173,1174],{},"Type",[958,1176,1177],{},"Default",[958,1179,966],{},[968,1181,1182,1200,1219],{},[955,1183,1184,1189,1194,1197],{},[973,1185,1186],{},[272,1187,1188],{},"apiKey",[973,1190,1191],{},[272,1192,1193],{},"string",[973,1195,1196],{},"-",[973,1198,1199],{},"Project API key (required)",[955,1201,1202,1207,1211,1216],{},[973,1203,1204],{},[272,1205,1206],{},"host",[973,1208,1209],{},[272,1210,1193],{},[973,1212,1213],{},[272,1214,1215],{},"https:\u002F\u002Fus.i.posthog.com",[973,1217,1218],{},"PostHog host URL",[955,1220,1221,1226,1231,1236],{},[973,1222,1223],{},[272,1224,1225],{},"timeout",[973,1227,1228],{},[272,1229,1230],{},"number",[973,1232,1233],{},[272,1234,1235],{},"5000",[973,1237,1238],{},"Request timeout in milliseconds",[349,1240,1242],{"id":1241},"how-it-works","How It Works",[245,1244,1245,1246,1248,1249,1252],{},"Under the hood, ",[272,1247,920],{}," wraps the OTLP adapter's ",[272,1250,1251],{},"sendBatchToOTLP()"," with PostHog-specific defaults:",[1254,1255,1256,1266,1275],"ul",{},[404,1257,1258,1261,1262,1265],{},[416,1259,1260],{},"Endpoint",": ",[272,1263,1264],{},"{host}\u002Fi\u002Fv1\u002Flogs"," (PostHog's OTLP log ingest endpoint)",[404,1267,1268,1261,1271,1274],{},[416,1269,1270],{},"Auth",[272,1272,1273],{},"Authorization: Bearer {apiKey}"," header",[404,1276,1277,1280,1281,1284],{},[416,1278,1279],{},"Format",": Standard OTLP ",[272,1282,1283],{},"ExportLogsServiceRequest"," with severity levels, trace context, and structured attributes",[349,1286,1288],{"id":1287},"regions","Regions",[245,1290,1291,1292,1294],{},"PostHog offers US and EU cloud hosting. Set the ",[272,1293,1206],{}," to match your region:",[949,1296,1297,1307],{},[952,1298,1299],{},[955,1300,1301,1304],{},[958,1302,1303],{},"Region",[958,1305,1306],{},"Host",[968,1308,1309,1318,1327],{},[955,1310,1311,1314],{},[973,1312,1313],{},"US (default)",[973,1315,1316],{},[272,1317,1215],{},[955,1319,1320,1323],{},[973,1321,1322],{},"EU",[973,1324,1325],{},[272,1326,1134],{},[955,1328,1329,1332],{},[973,1330,1331],{},"Self-hosted",[973,1333,1334],{},"Your instance URL",[264,1336,1338],{"className":439,"code":1337,"filename":441,"language":442,"meta":270,"style":270},"# EU region\nPOSTHOG_API_KEY=phc_xxx\nPOSTHOG_HOST=https:\u002F\u002Feu.i.posthog.com\n",[272,1339,1340,1345,1354],{"__ignoreMap":270},[275,1341,1342],{"class":277,"line":278},[275,1343,1344],{"class":473},"# EU region\n",[275,1346,1347,1349,1351],{"class":277,"line":284},[275,1348,449],{"class":374},[275,1350,452],{"class":370},[275,1352,1353],{"class":387},"phc_xxx\n",[275,1355,1356,1358,1360],{"class":277,"line":291},[275,1357,993],{"class":374},[275,1359,452],{"class":370},[275,1361,1362],{"class":387},"https:\u002F\u002Feu.i.posthog.com\n",[349,1364,1366],{"id":1365},"querying-logs-in-posthog","Querying Logs in PostHog",[245,1368,1369,1370,1373],{},"Once your logs are flowing, use the ",[416,1371,1372],{},"Logs"," tab in PostHog to query them:",[401,1375,1376,1381,1384],{},[404,1377,414,1378,1380],{},[416,1379,1372],{}," and filter by service, severity, or any structured attribute",[404,1382,1383],{},"Use the search bar to find specific log entries",[404,1385,1386],{},"Click on a log entry to see all structured attributes",[349,1388,1390],{"id":1389},"posthog-events-custom-events","PostHog Events (Custom Events)",[245,1392,1393,1394,622],{},"If you prefer sending logs as PostHog custom events (e.g., for product analytics, cohorts, or funnels), use ",[272,1395,1396],{},"createPostHogEventsDrain()",[264,1398,1400],{"className":357,"code":1399,"language":359,"meta":270,"style":270},"import { createPostHogEventsDrain } from 'evlog\u002Fposthog'\n\nconst drain = createPostHogEventsDrain({\n  eventName: 'server_request',\n  distinctId: 'my-backend-service',\n})\n",[272,1401,1402,1421,1425,1439,1455,1471],{"__ignoreMap":270},[275,1403,1404,1406,1408,1411,1413,1415,1417,1419],{"class":277,"line":278},[275,1405,367],{"class":366},[275,1407,371],{"class":370},[275,1409,1410],{"class":374}," createPostHogEventsDrain",[275,1412,378],{"class":370},[275,1414,381],{"class":366},[275,1416,384],{"class":370},[275,1418,388],{"class":387},[275,1420,391],{"class":370},[275,1422,1423],{"class":277,"line":284},[275,1424,288],{"emptyLinePlaceholder":287},[275,1426,1427,1429,1431,1433,1435,1437],{"class":277,"line":291},[275,1428,1111],{"class":522},[275,1430,1114],{"class":374},[275,1432,452],{"class":370},[275,1434,1410],{"class":507},[275,1436,511],{"class":374},[275,1438,1031],{"class":370},[275,1440,1441,1444,1446,1448,1451,1453],{"class":277,"line":297},[275,1442,1443],{"class":545},"  eventName",[275,1445,622],{"class":370},[275,1447,384],{"class":370},[275,1449,1450],{"class":387},"server_request",[275,1452,548],{"class":370},[275,1454,1139],{"class":370},[275,1456,1457,1460,1462,1464,1467,1469],{"class":277,"line":303},[275,1458,1459],{"class":545},"  distinctId",[275,1461,622],{"class":370},[275,1463,384],{"class":370},[275,1465,1466],{"class":387},"my-backend-service",[275,1468,548],{"class":370},[275,1470,1139],{"class":370},[275,1472,1473,1475],{"class":277,"line":309},[275,1474,566],{"class":370},[275,1476,569],{"class":374},[245,1478,1479,1480,1483,1484,1486,1487,1490],{},"Then pass ",[272,1481,1482],{},"drain"," to your framework the same way as ",[272,1485,920],{}," (see ",[248,1488,20],{"href":1489},"#quick-start"," above).",[1492,1493,1495,1496,1498],"callout",{"color":1494,"icon":13},"info","Custom events count towards your PostHog event quota. PostHog Logs (the default ",[272,1497,920],{},") is significantly cheaper.",[396,1500,1502],{"id":1501},"events-configuration","Events Configuration",[949,1504,1505,1517],{},[952,1506,1507],{},[955,1508,1509,1511,1513,1515],{},[958,1510,1171],{},[958,1512,1174],{},[958,1514,1177],{},[958,1516,966],{},[968,1518,1519,1533,1549,1568,1591],{},[955,1520,1521,1525,1529,1531],{},[973,1522,1523],{},[272,1524,1188],{},[973,1526,1527],{},[272,1528,1193],{},[973,1530,1196],{},[973,1532,1199],{},[955,1534,1535,1539,1543,1547],{},[973,1536,1537],{},[272,1538,1206],{},[973,1540,1541],{},[272,1542,1193],{},[973,1544,1545],{},[272,1546,1215],{},[973,1548,1218],{},[955,1550,1551,1556,1560,1565],{},[973,1552,1553],{},[272,1554,1555],{},"eventName",[973,1557,1558],{},[272,1559,1193],{},[973,1561,1562],{},[272,1563,1564],{},"evlog_wide_event",[973,1566,1567],{},"PostHog event name",[955,1569,1570,1575,1579,1584],{},[973,1571,1572],{},[272,1573,1574],{},"distinctId",[973,1576,1577],{},[272,1578,1193],{},[973,1580,1581],{},[272,1582,1583],{},"event.service",[973,1585,1586,1587,1590],{},"Override ",[272,1588,1589],{},"distinct_id"," for all events",[955,1592,1593,1597,1601,1605],{},[973,1594,1595],{},[272,1596,1225],{},[973,1598,1599],{},[272,1600,1230],{},[973,1602,1603],{},[272,1604,1235],{},[973,1606,1238],{},[396,1608,1610],{"id":1609},"event-format","Event Format",[245,1612,1613],{},"evlog maps wide events to PostHog events:",[949,1615,1616,1626],{},[952,1617,1618],{},[955,1619,1620,1623],{},[958,1621,1622],{},"evlog Field",[958,1624,1625],{},"PostHog Field",[968,1627,1628,1646,1657,1669,1680,1692],{},[955,1629,1630,1641],{},[973,1631,1632,940,1635,940,1638],{},[272,1633,1634],{},"config.distinctId",[272,1636,1637],{},"userId",[272,1639,1640],{},"service",[973,1642,1643,1645],{},[272,1644,1589],{}," (fallback chain)",[955,1647,1648,1653],{},[973,1649,1650],{},[272,1651,1652],{},"timestamp",[973,1654,1655],{},[272,1656,1652],{},[955,1658,1659,1664],{},[973,1660,1661],{},[272,1662,1663],{},"level",[973,1665,1666],{},[272,1667,1668],{},"properties.level",[955,1670,1671,1675],{},[973,1672,1673],{},[272,1674,1640],{},[973,1676,1677],{},[272,1678,1679],{},"properties.service",[955,1681,1682,1687],{},[973,1683,1684],{},[272,1685,1686],{},"environment",[973,1688,1689],{},[272,1690,1691],{},"properties.environment",[955,1693,1694,1697],{},[973,1695,1696],{},"All other fields",[973,1698,1699],{},[272,1700,1701],{},"properties.*",[396,1703,1705],{"id":1704},"distinct-id-resolution","Distinct ID Resolution",[245,1707,1708,1709,1711],{},"The ",[272,1710,1589],{}," follows a fallback chain:",[401,1713,1714,1723,1731],{},[404,1715,1716,1720,1721],{},[416,1717,1718],{},[272,1719,1634],{}," - explicit override in ",[272,1722,1396],{},[404,1724,1725,1730],{},[416,1726,1727],{},[272,1728,1729],{},"event.userId"," - automatically picked up if present as a string",[404,1732,1733,1737],{},[416,1734,1735],{},[272,1736,1583],{}," - final fallback",[396,1739,1741],{"id":1740},"logs-vs-events","Logs vs Events",[949,1743,1744,1758],{},[952,1745,1746],{},[955,1747,1748,1750,1754],{},[958,1749],{},[958,1751,1752],{},[272,1753,920],{},[958,1755,1756],{},[272,1757,1396],{},[968,1759,1760,1778,1791,1804],{},[955,1761,1762,1766,1772],{},[973,1763,1764],{},[416,1765,1279],{},[973,1767,1768,1769,432],{},"OTLP Logs (",[272,1770,1771],{},"\u002Fi\u002Fv1\u002Flogs",[973,1773,1774,1775,432],{},"PostHog Events (",[272,1776,1777],{},"\u002Fbatch\u002F",[955,1779,1780,1785,1788],{},[973,1781,1782],{},[416,1783,1784],{},"PostHog UI",[973,1786,1787],{},"Logs viewer",[973,1789,1790],{},"Events explorer",[955,1792,1793,1798,1801],{},[973,1794,1795],{},[416,1796,1797],{},"Cost",[973,1799,1800],{},"Lower (dedicated logs pipeline)",[973,1802,1803],{},"Higher (counts as events)",[955,1805,1806,1811,1814],{},[973,1807,1808],{},[416,1809,1810],{},"Best for",[973,1812,1813],{},"Debugging, log search, observability",[973,1815,1816],{},"Product analytics, cohorts, funnels",[245,1818,1819],{},"You can use both drains simultaneously to get the best of both worlds:",[264,1821,1823],{"className":357,"code":1822,"language":359,"meta":270,"style":270},"import { createPostHogDrain, createPostHogEventsDrain } from 'evlog\u002Fposthog'\n\nconst logs = createPostHogDrain()\nconst events = createPostHogEventsDrain()\n\nconst drain = async (ctx) => {\n  await Promise.allSettled([logs(ctx), events(ctx)])\n}\n",[272,1824,1825,1847,1851,1865,1878,1882,1904,1942],{"__ignoreMap":270},[275,1826,1827,1829,1831,1833,1835,1837,1839,1841,1843,1845],{"class":277,"line":278},[275,1828,367],{"class":366},[275,1830,371],{"class":370},[275,1832,375],{"class":374},[275,1834,556],{"class":370},[275,1836,1410],{"class":374},[275,1838,378],{"class":370},[275,1840,381],{"class":366},[275,1842,384],{"class":370},[275,1844,388],{"class":387},[275,1846,391],{"class":370},[275,1848,1849],{"class":277,"line":284},[275,1850,288],{"emptyLinePlaceholder":287},[275,1852,1853,1855,1858,1860,1862],{"class":277,"line":291},[275,1854,1111],{"class":522},[275,1856,1857],{"class":374}," logs ",[275,1859,452],{"class":370},[275,1861,375],{"class":507},[275,1863,1864],{"class":374},"()\n",[275,1866,1867,1869,1872,1874,1876],{"class":277,"line":297},[275,1868,1111],{"class":522},[275,1870,1871],{"class":374}," events ",[275,1873,452],{"class":370},[275,1875,1410],{"class":507},[275,1877,1864],{"class":374},[275,1879,1880],{"class":277,"line":303},[275,1881,288],{"emptyLinePlaceholder":287},[275,1883,1884,1886,1888,1890,1893,1895,1898,1900,1902],{"class":277,"line":309},[275,1885,1111],{"class":522},[275,1887,1114],{"class":374},[275,1889,452],{"class":370},[275,1891,1892],{"class":522}," async",[275,1894,936],{"class":370},[275,1896,1897],{"class":516},"ctx",[275,1899,432],{"class":370},[275,1901,523],{"class":522},[275,1903,526],{"class":370},[275,1905,1906,1909,1913,1915,1918,1921,1924,1926,1928,1930,1932,1935,1937,1939],{"class":277,"line":315},[275,1907,1908],{"class":366},"  await",[275,1910,1912],{"class":1911},"sBMFI"," Promise",[275,1914,534],{"class":370},[275,1916,1917],{"class":507},"allSettled",[275,1919,1920],{"class":545},"([",[275,1922,1923],{"class":507},"logs",[275,1925,511],{"class":545},[275,1927,1897],{"class":374},[275,1929,432],{"class":545},[275,1931,556],{"class":370},[275,1933,1934],{"class":507}," events",[275,1936,511],{"class":545},[275,1938,1897],{"class":374},[275,1940,1941],{"class":545},")])\n",[275,1943,1944],{"class":277,"line":321},[275,1945,1946],{"class":370},"}\n",[349,1948,1950],{"id":1949},"troubleshooting","Troubleshooting",[396,1952,1954],{"id":1953},"missing-apikey-error","Missing apiKey error",[264,1956,1961],{"className":1957,"code":1959,"language":1960},[1958],"language-text","[evlog\u002Fposthog] Missing apiKey. Set POSTHOG_API_KEY env var or pass to createPostHogDrain()\n","text",[272,1962,1959],{"__ignoreMap":270},[245,1964,1965],{},"Make sure your environment variable is set and the server was restarted after adding it.",[396,1967,1969],{"id":1968},"events-not-appearing","Events not appearing",[245,1971,1972],{},"PostHog processes events asynchronously. There may be a short delay (typically under 1 minute) before events appear in the dashboard.",[401,1974,1975,1982,1987],{},[404,1976,1977,1978,1981],{},"Check the server console for ",[272,1979,1980],{},"[evlog\u002Fposthog]"," error messages",[404,1983,1984,1985],{},"Verify your API key is correct and starts with ",[272,1986,431],{},[404,1988,1989,1990,1992],{},"Confirm your ",[272,1991,1206],{}," matches your PostHog region (US vs EU)",[396,1994,1996],{"id":1995},"wrong-region","Wrong region",[245,1998,1999,2000,2002],{},"If you're on PostHog EU but using the default US host, event delivery will fail and the adapter will log errors (for example under ",[272,2001,1980],{},") to your server console. Set the correct host:",[264,2004,2006],{"className":439,"code":2005,"filename":441,"language":442,"meta":270,"style":270},"POSTHOG_HOST=https:\u002F\u002Feu.i.posthog.com\n",[272,2007,2008],{"__ignoreMap":270},[275,2009,2010,2012,2014],{"class":277,"line":278},[275,2011,993],{"class":374},[275,2013,452],{"class":370},[275,2015,1362],{"class":387},[349,2017,2019],{"id":2018},"direct-api-usage","Direct API Usage",[245,2021,2022],{},"For advanced use cases, you can use the lower-level functions:",[264,2024,2027],{"className":357,"code":2025,"filename":2026,"language":359,"meta":270,"style":270},"import { sendToPostHog, sendBatchToPostHog } from 'evlog\u002Fposthog'\n\n\u002F\u002F Send a single event to PostHog Logs (OTLP)\nawait sendToPostHog(event, {\n  apiKey: 'phc_xxx',\n})\n\n\u002F\u002F Send multiple events in one request\nawait sendBatchToPostHog(events, {\n  apiKey: 'phc_xxx',\n})\n","server\u002Futils\u002Fposthog.ts",[272,2028,2029,2053,2057,2062,2075,2091,2097,2101,2106,2119,2133],{"__ignoreMap":270},[275,2030,2031,2033,2035,2038,2040,2043,2045,2047,2049,2051],{"class":277,"line":278},[275,2032,367],{"class":366},[275,2034,371],{"class":370},[275,2036,2037],{"class":374}," sendToPostHog",[275,2039,556],{"class":370},[275,2041,2042],{"class":374}," sendBatchToPostHog",[275,2044,378],{"class":370},[275,2046,381],{"class":366},[275,2048,384],{"class":370},[275,2050,388],{"class":387},[275,2052,391],{"class":370},[275,2054,2055],{"class":277,"line":284},[275,2056,288],{"emptyLinePlaceholder":287},[275,2058,2059],{"class":277,"line":291},[275,2060,2061],{"class":473},"\u002F\u002F Send a single event to PostHog Logs (OTLP)\n",[275,2063,2064,2066,2068,2071,2073],{"class":277,"line":297},[275,2065,718],{"class":366},[275,2067,2037],{"class":507},[275,2069,2070],{"class":374},"(event",[275,2072,556],{"class":370},[275,2074,526],{"class":370},[275,2076,2077,2080,2082,2084,2087,2089],{"class":277,"line":303},[275,2078,2079],{"class":545},"  apiKey",[275,2081,622],{"class":370},[275,2083,384],{"class":370},[275,2085,2086],{"class":387},"phc_xxx",[275,2088,548],{"class":370},[275,2090,1139],{"class":370},[275,2092,2093,2095],{"class":277,"line":309},[275,2094,566],{"class":370},[275,2096,569],{"class":374},[275,2098,2099],{"class":277,"line":315},[275,2100,288],{"emptyLinePlaceholder":287},[275,2102,2103],{"class":277,"line":321},[275,2104,2105],{"class":473},"\u002F\u002F Send multiple events in one request\n",[275,2107,2108,2110,2112,2115,2117],{"class":277,"line":327},[275,2109,718],{"class":366},[275,2111,2042],{"class":507},[275,2113,2114],{"class":374},"(events",[275,2116,556],{"class":370},[275,2118,526],{"class":370},[275,2120,2121,2123,2125,2127,2129,2131],{"class":277,"line":333},[275,2122,2079],{"class":545},[275,2124,622],{"class":370},[275,2126,384],{"class":370},[275,2128,2086],{"class":387},[275,2130,548],{"class":370},[275,2132,1139],{"class":370},[275,2134,2135,2137],{"class":277,"line":338},[275,2136,566],{"class":370},[275,2138,569],{"class":374},[245,2140,2141],{},"For custom events, use the events-specific functions:",[264,2143,2145],{"className":357,"code":2144,"filename":2026,"language":359,"meta":270,"style":270},"import { sendToPostHogEvents, sendBatchToPostHogEvents, toPostHogEvent } from 'evlog\u002Fposthog'\n\n\u002F\u002F Send a single custom event\nawait sendToPostHogEvents(event, {\n  apiKey: 'phc_xxx',\n})\n\n\u002F\u002F Send multiple custom events in one request\nawait sendBatchToPostHogEvents(events, {\n  apiKey: 'phc_xxx',\n})\n\n\u002F\u002F Convert event to PostHog format (for inspection)\nconst posthogEvent = toPostHogEvent(event, { apiKey: 'phc_xxx' })\n",[272,2146,2147,2176,2180,2185,2197,2211,2217,2221,2226,2238,2252,2258,2262,2268],{"__ignoreMap":270},[275,2148,2149,2151,2153,2156,2158,2161,2163,2166,2168,2170,2172,2174],{"class":277,"line":278},[275,2150,367],{"class":366},[275,2152,371],{"class":370},[275,2154,2155],{"class":374}," sendToPostHogEvents",[275,2157,556],{"class":370},[275,2159,2160],{"class":374}," sendBatchToPostHogEvents",[275,2162,556],{"class":370},[275,2164,2165],{"class":374}," toPostHogEvent",[275,2167,378],{"class":370},[275,2169,381],{"class":366},[275,2171,384],{"class":370},[275,2173,388],{"class":387},[275,2175,391],{"class":370},[275,2177,2178],{"class":277,"line":284},[275,2179,288],{"emptyLinePlaceholder":287},[275,2181,2182],{"class":277,"line":291},[275,2183,2184],{"class":473},"\u002F\u002F Send a single custom event\n",[275,2186,2187,2189,2191,2193,2195],{"class":277,"line":297},[275,2188,718],{"class":366},[275,2190,2155],{"class":507},[275,2192,2070],{"class":374},[275,2194,556],{"class":370},[275,2196,526],{"class":370},[275,2198,2199,2201,2203,2205,2207,2209],{"class":277,"line":303},[275,2200,2079],{"class":545},[275,2202,622],{"class":370},[275,2204,384],{"class":370},[275,2206,2086],{"class":387},[275,2208,548],{"class":370},[275,2210,1139],{"class":370},[275,2212,2213,2215],{"class":277,"line":309},[275,2214,566],{"class":370},[275,2216,569],{"class":374},[275,2218,2219],{"class":277,"line":315},[275,2220,288],{"emptyLinePlaceholder":287},[275,2222,2223],{"class":277,"line":321},[275,2224,2225],{"class":473},"\u002F\u002F Send multiple custom events in one request\n",[275,2227,2228,2230,2232,2234,2236],{"class":277,"line":327},[275,2229,718],{"class":366},[275,2231,2160],{"class":507},[275,2233,2114],{"class":374},[275,2235,556],{"class":370},[275,2237,526],{"class":370},[275,2239,2240,2242,2244,2246,2248,2250],{"class":277,"line":333},[275,2241,2079],{"class":545},[275,2243,622],{"class":370},[275,2245,384],{"class":370},[275,2247,2086],{"class":387},[275,2249,548],{"class":370},[275,2251,1139],{"class":370},[275,2253,2254,2256],{"class":277,"line":338},[275,2255,566],{"class":370},[275,2257,569],{"class":374},[275,2259,2260],{"class":277,"line":344},[275,2261,288],{"emptyLinePlaceholder":287},[275,2263,2265],{"class":277,"line":2264},13,[275,2266,2267],{"class":473},"\u002F\u002F Convert event to PostHog format (for inspection)\n",[275,2269,2271,2273,2276,2278,2280,2282,2284,2286,2289,2291,2293,2295,2297,2299],{"class":277,"line":2270},14,[275,2272,1111],{"class":522},[275,2274,2275],{"class":374}," posthogEvent ",[275,2277,452],{"class":370},[275,2279,2165],{"class":507},[275,2281,2070],{"class":374},[275,2283,556],{"class":370},[275,2285,371],{"class":370},[275,2287,2288],{"class":545}," apiKey",[275,2290,622],{"class":370},[275,2292,384],{"class":370},[275,2294,2086],{"class":387},[275,2296,548],{"class":370},[275,2298,378],{"class":370},[275,2300,569],{"class":374},[349,2302,2304],{"id":2303},"next-steps","Next Steps",[1254,2306,2307,2313,2319,2324],{},[404,2308,2309,2312],{},[248,2310,2311],{"href":170},"Axiom Adapter"," - Send logs to Axiom",[404,2314,2315,2318],{},[248,2316,2317],{"href":175},"OTLP Adapter"," - Send logs via OpenTelemetry Protocol",[404,2320,2321,2323],{},[248,2322,199],{"href":200}," - Build your own adapter",[404,2325,2326,2328],{},[248,2327,131],{"href":132}," - Security and production tips",[2330,2331,2332],"style",{},"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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":270,"searchDepth":284,"depth":284,"links":2334},[2335,2336,2341,2347,2348,2349,2350,2356,2361,2362],{"id":351,"depth":284,"text":15},{"id":394,"depth":284,"text":20,"children":2337},[2338,2339,2340],{"id":398,"depth":291,"text":399},{"id":435,"depth":291,"text":436},{"id":458,"depth":291,"text":459},{"id":906,"depth":284,"text":150,"children":2342},[2343,2344,2345,2346],{"id":946,"depth":291,"text":947},{"id":1004,"depth":291,"text":1005},{"id":1097,"depth":291,"text":1098},{"id":1161,"depth":291,"text":1162},{"id":1241,"depth":284,"text":1242},{"id":1287,"depth":284,"text":1288},{"id":1365,"depth":284,"text":1366},{"id":1389,"depth":284,"text":1390,"children":2351},[2352,2353,2354,2355],{"id":1501,"depth":291,"text":1502},{"id":1609,"depth":291,"text":1610},{"id":1704,"depth":291,"text":1705},{"id":1740,"depth":291,"text":1741},{"id":1949,"depth":284,"text":1950,"children":2357},[2358,2359,2360],{"id":1953,"depth":291,"text":1954},{"id":1968,"depth":291,"text":1969},{"id":1995,"depth":291,"text":1996},{"id":2018,"depth":284,"text":2019},{"id":2303,"depth":284,"text":2304},"Send wide events to PostHog Logs via OTLP for structured log querying, debugging, and observability in your PostHog dashboard.","md",[2366,2372],{"label":2367,"icon":2368,"to":409,"target":2369,"color":2370,"variant":2371},"PostHog Dashboard","i-lucide-external-link","_blank","neutral","subtle",{"label":2311,"icon":172,"to":170,"color":2370,"variant":2371},{},{"title":179,"icon":182},{"title":240,"description":2363},"aQbDx1Md1BhxA4oye7CgIR171tnThxBQjUMwlGPmaF4",[2378,2380],{"title":174,"path":175,"stem":176,"description":2379,"icon":177,"children":-1},"Send logs via OpenTelemetry Protocol (OTLP) to Grafana, Datadog, Honeycomb, and any compatible backend. Supports gRPC and HTTP transports.",{"title":184,"path":185,"stem":186,"description":2381,"icon":187,"children":-1},"Send structured logs to Sentry Logs for high-cardinality querying and debugging. Zero-config setup with environment variables.",1773504121155]