[{"data":1,"prerenderedAt":4655},["ShallowReactive",2],{"navigation_docs":3,"-use-cases-eve":598,"-use-cases-eve-surround":4650},[4,35,85,138,318,453,475,534,573],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Start","\u002Fstart","1.start",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Why start with evlog","\u002Fstart\u002Fwhy-evlog","1.start\u002F2.why-evlog","i-lucide-rocket",{"title":20,"path":21,"stem":22,"icon":23},"Installation","\u002Fstart\u002Finstallation","1.start\u002F3.installation","i-lucide-download",{"title":25,"path":26,"stem":27,"icon":28},"Quick Start","\u002Fstart\u002Fquick-start","1.start\u002F4.quick-start","i-lucide-zap",{"title":30,"path":31,"stem":32,"icon":33},"Choose your logger","\u002Fstart\u002Ftypescript-logging-library","1.start\u002F5.typescript-logging-library","i-lucide-file-code",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Learn","\u002Flearn","2.learn",[40,45,50,55,60,65,70,75,80],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flearn\u002Foverview","2.learn\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flearn\u002Fsimple-logging","2.learn\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flearn\u002Fwide-events","2.learn\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flearn\u002Fstructured-errors","2.learn\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Lifecycle","\u002Flearn\u002Flifecycle","2.learn\u002F4.lifecycle","i-lucide-arrow-right-left",{"title":66,"path":67,"stem":68,"icon":69},"Sampling","\u002Flearn\u002Fsampling","2.learn\u002F5.sampling","i-lucide-filter",{"title":71,"path":72,"stem":73,"icon":74},"Auto-Redaction","\u002Flearn\u002Fredaction","2.learn\u002F6.redaction","i-lucide-eye-off",{"title":76,"path":77,"stem":78,"icon":79},"Typed Fields","\u002Flearn\u002Ftyped-fields","2.learn\u002F7.typed-fields","i-simple-icons-typescript",{"title":81,"path":82,"stem":83,"icon":84},"Catalogs","\u002Flearn\u002Fcatalogs","2.learn\u002F8.catalogs","i-lucide-book-open",{"title":86,"path":87,"stem":88,"children":89,"page":34},"CLI","\u002Fcli","3.cli",[90,93,98,103,108,113,118,123,128,133],{"title":41,"path":91,"stem":92,"icon":49},"\u002Fcli\u002Foverview","3.cli\u002F0.overview",{"title":94,"path":95,"stem":96,"icon":97},"init","\u002Fcli\u002Finit","3.cli\u002F1.init","i-lucide-wand-sparkles",{"title":99,"path":100,"stem":101,"icon":102},"map","\u002Fcli\u002Fmap","3.cli\u002F2.map","i-lucide-radar",{"title":104,"path":105,"stem":106,"icon":107},"Rules","\u002Fcli\u002Frules","3.cli\u002F3.rules","i-lucide-list-checks",{"title":109,"path":110,"stem":111,"icon":112},"Scoring","\u002Fcli\u002Fscoring","3.cli\u002F4.scoring","i-lucide-gauge",{"title":114,"path":115,"stem":116,"icon":117},"CI","\u002Fcli\u002Fci","3.cli\u002F5.ci","i-lucide-git-pull-request",{"title":119,"path":120,"stem":121,"icon":122},"doctor","\u002Fcli\u002Fdoctor","3.cli\u002F6.doctor","i-lucide-stethoscope",{"title":124,"path":125,"stem":126,"icon":127},"telemetry","\u002Fcli\u002Ftelemetry","3.cli\u002F7.telemetry","i-lucide-bar-chart-3",{"title":129,"path":130,"stem":131,"icon":132},"agents","\u002Fcli\u002Fagents","3.cli\u002F8.agents","i-lucide-bot",{"title":134,"path":135,"stem":136,"icon":137},"Observability Score","\u002Fcli\u002Fobservability-score","3.cli\u002F9.observability-score","i-lucide-activity",{"title":139,"path":140,"stem":141,"children":142,"page":34},"Integrate","\u002Fintegrate","4.integrate",[143,147,230],{"title":41,"path":144,"stem":145,"icon":146},"\u002Fintegrate\u002Foverview","4.integrate\u002F0.overview","i-lucide-plug",{"title":148,"path":149,"stem":150,"children":151,"page":34},"Adapters","\u002Fintegrate\u002Fadapters","4.integrate\u002Fadapters",[152,155,185,210],{"title":41,"path":153,"stem":154,"icon":44},"\u002Fintegrate\u002Fadapters\u002Foverview","4.integrate\u002Fadapters\u002F01.overview",{"title":156,"path":157,"stem":158,"children":159,"page":34},"Cloud","\u002Fintegrate\u002Fadapters\u002Fcloud","4.integrate\u002Fadapters\u002Fcloud",[160,165,170,175,180],{"title":161,"path":162,"stem":163,"icon":164},"Axiom","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Faxiom","4.integrate\u002Fadapters\u002Fcloud\u002F01.axiom","i-custom-axiom",{"title":166,"path":167,"stem":168,"icon":169},"PostHog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fposthog","4.integrate\u002Fadapters\u002Fcloud\u002F02.posthog","i-simple-icons-posthog",{"title":171,"path":172,"stem":173,"icon":174},"Sentry","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fsentry","4.integrate\u002Fadapters\u002Fcloud\u002F03.sentry","i-simple-icons-sentry",{"title":176,"path":177,"stem":178,"icon":179},"Better Stack","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fbetter-stack","4.integrate\u002Fadapters\u002Fcloud\u002F04.better-stack","i-simple-icons-betterstack",{"title":181,"path":182,"stem":183,"icon":184},"Datadog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fdatadog","4.integrate\u002Fadapters\u002Fcloud\u002F05.datadog","i-simple-icons-datadog",{"title":186,"path":187,"stem":188,"children":189,"page":34},"Cloud or Self-Hosted","\u002Fintegrate\u002Fadapters\u002Fhybrid","4.integrate\u002Fadapters\u002Fhybrid",[190,195,200,205],{"title":191,"path":192,"stem":193,"icon":194},"Grafana Loki","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Floki","4.integrate\u002Fadapters\u002Fhybrid\u002F01.loki","i-simple-icons-grafana",{"title":196,"path":197,"stem":198,"icon":199},"ClickHouse","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fclickhouse","4.integrate\u002Fadapters\u002Fhybrid\u002F02.clickhouse","i-simple-icons-clickhouse",{"title":201,"path":202,"stem":203,"icon":204},"OTLP","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fotlp","4.integrate\u002Fadapters\u002Fhybrid\u002F03.otlp","i-simple-icons-opentelemetry",{"title":206,"path":207,"stem":208,"icon":209},"HyperDX","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fhyperdx","4.integrate\u002Fadapters\u002Fhybrid\u002F04.hyperdx","i-custom-hyperdx",{"title":211,"path":212,"stem":213,"children":214,"page":34},"Self-Hosted","\u002Fintegrate\u002Fadapters\u002Fself-hosted","4.integrate\u002Fadapters\u002Fself-hosted",[215,220,225],{"title":216,"path":217,"stem":218,"icon":219},"File System","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Ffs","4.integrate\u002Fadapters\u002Fself-hosted\u002F01.fs","i-lucide-hard-drive",{"title":221,"path":222,"stem":223,"icon":224},"NuxtHub","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fnuxthub","4.integrate\u002Fadapters\u002Fself-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":226,"path":227,"stem":228,"icon":229},"Memory","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fmemory","4.integrate\u002Fadapters\u002Fself-hosted\u002F03.memory","i-lucide-cpu",{"title":231,"path":232,"stem":233,"children":234,"page":34},"Frameworks","\u002Fintegrate\u002Fframeworks","4.integrate\u002Fframeworks",[235,239,244,249,254,259,264,269,274,279,284,289,294,299,303,308,313],{"title":41,"path":236,"stem":237,"icon":238},"\u002Fintegrate\u002Fframeworks\u002Foverview","4.integrate\u002Fframeworks\u002F00.overview","i-lucide-layout-grid",{"title":240,"path":241,"stem":242,"icon":243},"Nuxt","\u002Fintegrate\u002Fframeworks\u002Fnuxt","4.integrate\u002Fframeworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":245,"path":246,"stem":247,"icon":248},"Next.js","\u002Fintegrate\u002Fframeworks\u002Fnextjs","4.integrate\u002Fframeworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":250,"path":251,"stem":252,"icon":253},"SvelteKit","\u002Fintegrate\u002Fframeworks\u002Fsveltekit","4.integrate\u002Fframeworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":255,"path":256,"stem":257,"icon":258},"Nitro","\u002Fintegrate\u002Fframeworks\u002Fnitro","4.integrate\u002Fframeworks\u002F04.nitro","i-custom-nitro",{"title":260,"path":261,"stem":262,"icon":263},"TanStack Start","\u002Fintegrate\u002Fframeworks\u002Ftanstack-start","4.integrate\u002Fframeworks\u002F05.tanstack-start","i-custom-tanstack",{"title":265,"path":266,"stem":267,"icon":268},"NestJS","\u002Fintegrate\u002Fframeworks\u002Fnestjs","4.integrate\u002Fframeworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":270,"path":271,"stem":272,"icon":273},"Express","\u002Fintegrate\u002Fframeworks\u002Fexpress","4.integrate\u002Fframeworks\u002F07.express","i-simple-icons-express",{"title":275,"path":276,"stem":277,"icon":278},"Hono","\u002Fintegrate\u002Fframeworks\u002Fhono","4.integrate\u002Fframeworks\u002F08.hono","i-simple-icons-hono",{"title":280,"path":281,"stem":282,"icon":283},"Fastify","\u002Fintegrate\u002Fframeworks\u002Ffastify","4.integrate\u002Fframeworks\u002F09.fastify","i-simple-icons-fastify",{"title":285,"path":286,"stem":287,"icon":288},"Elysia","\u002Fintegrate\u002Fframeworks\u002Felysia","4.integrate\u002Fframeworks\u002F10.elysia","i-custom-elysia",{"title":290,"path":291,"stem":292,"icon":293},"React Router","\u002Fintegrate\u002Fframeworks\u002Freact-router","4.integrate\u002Fframeworks\u002F11.react-router","i-custom-reactrouter",{"title":295,"path":296,"stem":297,"icon":298},"Cloudflare Workers","\u002Fintegrate\u002Fframeworks\u002Fcloudflare-workers","4.integrate\u002Fframeworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":300,"path":301,"stem":302,"icon":79},"Standalone","\u002Fintegrate\u002Fframeworks\u002Fstandalone","4.integrate\u002Fframeworks\u002F13.standalone",{"title":304,"path":305,"stem":306,"icon":307},"Astro","\u002Fintegrate\u002Fframeworks\u002Fastro","4.integrate\u002Fframeworks\u002F14.astro","i-simple-icons-astro",{"title":309,"path":310,"stem":311,"icon":312},"oRPC","\u002Fintegrate\u002Fframeworks\u002Forpc","4.integrate\u002Fframeworks\u002F15.orpc","i-lucide-network",{"title":314,"path":315,"stem":316,"icon":317},"AWS Lambda","\u002Fintegrate\u002Fframeworks\u002Faws-lambda","4.integrate\u002Fframeworks\u002F16.aws-lambda","i-custom-lambda",{"title":319,"path":320,"stem":321,"children":322,"page":34},"Use Cases","\u002Fuse-cases","5.use-cases",[323,326,331,359,386,418,439,444,449],{"title":41,"path":324,"stem":325,"icon":107},"\u002Fuse-cases\u002Foverview","5.use-cases\u002F0.overview",{"title":327,"path":328,"stem":329,"icon":330},"Client Logging","\u002Fuse-cases\u002Fclient-logging","5.use-cases\u002F1.client-logging","i-lucide-monitor",{"title":332,"icon":333,"path":334,"stem":335,"children":336,"page":34},"AI SDK","i-simple-icons-vercel","\u002Fuse-cases\u002Fai-sdk","5.use-cases\u002F2.ai-sdk",[337,340,345,350,355],{"title":41,"path":338,"stem":339,"icon":44},"\u002Fuse-cases\u002Fai-sdk\u002Foverview","5.use-cases\u002F2.ai-sdk\u002F01.overview",{"title":341,"path":342,"stem":343,"icon":344},"Usage","\u002Fuse-cases\u002Fai-sdk\u002Fusage","5.use-cases\u002F2.ai-sdk\u002F02.usage","i-lucide-code",{"title":346,"path":347,"stem":348,"icon":349},"Options","\u002Fuse-cases\u002Fai-sdk\u002Foptions","5.use-cases\u002F2.ai-sdk\u002F03.options","i-lucide-sliders",{"title":351,"path":352,"stem":353,"icon":354},"Metadata","\u002Fuse-cases\u002Fai-sdk\u002Fmetadata","5.use-cases\u002F2.ai-sdk\u002F04.metadata","i-lucide-database",{"title":356,"path":357,"stem":358,"icon":137},"Telemetry","\u002Fuse-cases\u002Fai-sdk\u002Ftelemetry","5.use-cases\u002F2.ai-sdk\u002F05.telemetry",{"title":360,"icon":361,"path":362,"stem":363,"children":364,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Fuse-cases\u002Fbetter-auth","5.use-cases\u002F3.better-auth",[365,368,373,378,382],{"title":41,"path":366,"stem":367,"icon":44},"\u002Fuse-cases\u002Fbetter-auth\u002Foverview","5.use-cases\u002F3.better-auth\u002F01.overview",{"title":369,"path":370,"stem":371,"icon":372},"Identify User","\u002Fuse-cases\u002Fbetter-auth\u002Fidentify-user","5.use-cases\u002F3.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":374,"path":375,"stem":376,"icon":377},"Middleware","\u002Fuse-cases\u002Fbetter-auth\u002Fmiddleware","5.use-cases\u002F3.better-auth\u002F03.middleware","i-lucide-shield",{"title":379,"path":380,"stem":381,"icon":330},"Client Sync","\u002Fuse-cases\u002Fbetter-auth\u002Fclient-sync","5.use-cases\u002F3.better-auth\u002F04.client-sync",{"title":383,"path":384,"stem":385,"icon":112},"Performance","\u002Fuse-cases\u002Fbetter-auth\u002Fperformance","5.use-cases\u002F3.better-auth\u002F05.performance",{"title":387,"icon":388,"path":389,"stem":390,"children":391,"page":34},"Audit Logs","i-lucide-shield-check","\u002Fuse-cases\u002Faudit","5.use-cases\u002F4.audit",[392,395,400,405,410,414],{"title":41,"path":393,"stem":394,"icon":44},"\u002Fuse-cases\u002Faudit\u002Foverview","5.use-cases\u002F4.audit\u002F01.overview",{"title":396,"path":397,"stem":398,"icon":399},"Schema","\u002Fuse-cases\u002Faudit\u002Fschema","5.use-cases\u002F4.audit\u002F02.schema","i-lucide-file-text",{"title":401,"path":402,"stem":403,"icon":404},"Recording","\u002Fuse-cases\u002Faudit\u002Frecording","5.use-cases\u002F4.audit\u002F03.recording","i-lucide-pen-line",{"title":406,"path":407,"stem":408,"icon":409},"Drains","\u002Fuse-cases\u002Faudit\u002Fpipeline","5.use-cases\u002F4.audit\u002F04.pipeline","i-lucide-link",{"title":411,"path":412,"stem":413,"icon":388},"Compliance","\u002Fuse-cases\u002Faudit\u002Fcompliance","5.use-cases\u002F4.audit\u002F05.compliance",{"title":415,"path":416,"stem":417,"icon":84},"Recipes","\u002Fuse-cases\u002Faudit\u002Frecipes","5.use-cases\u002F4.audit\u002F06.recipes",{"title":356,"icon":112,"path":419,"stem":420,"children":421,"page":34},"\u002Fuse-cases\u002Ftelemetry","5.use-cases\u002F4.telemetry",[422,425,430,435],{"title":41,"path":423,"stem":424,"icon":44},"\u002Fuse-cases\u002Ftelemetry\u002Foverview","5.use-cases\u002F4.telemetry\u002F01.overview",{"title":426,"path":427,"stem":428,"icon":429},"Setup","\u002Fuse-cases\u002Ftelemetry\u002Fsetup","5.use-cases\u002F4.telemetry\u002F02.setup","i-lucide-wrench",{"title":431,"path":432,"stem":433,"icon":434},"Ingest","\u002Fuse-cases\u002Ftelemetry\u002Fingest","5.use-cases\u002F4.telemetry\u002F03.ingest","i-lucide-server",{"title":436,"path":437,"stem":438,"icon":84},"Reference","\u002Fuse-cases\u002Ftelemetry\u002Freference","5.use-cases\u002F4.telemetry\u002F04.reference",{"title":440,"path":441,"stem":442,"icon":443},"Enrichers","\u002Fuse-cases\u002Fenrichers","5.use-cases\u002F5.enrichers","i-lucide-sparkles",{"title":445,"path":446,"stem":447,"icon":448},"eve","\u002Fuse-cases\u002Feve","5.use-cases\u002F5.eve","i-custom-eve",{"title":450,"path":451,"stem":452,"icon":434},"Node.js request logging","\u002Fuse-cases\u002Fstructured-logging-nodejs","5.use-cases\u002F6.structured-logging-nodejs",{"title":454,"path":455,"stem":456,"children":457,"page":34},"Libraries","\u002Flibraries","6.libraries",[458,462,467,470],{"title":41,"path":459,"stem":460,"icon":461},"\u002Flibraries\u002Foverview","6.libraries\u002F0.overview","i-lucide-package",{"title":463,"path":464,"stem":465,"icon":466},"Emitting Events","\u002Flibraries\u002Femitting","6.libraries\u002F1.emitting","i-lucide-radio",{"title":56,"path":468,"stem":469,"icon":59},"\u002Flibraries\u002Ferrors","6.libraries\u002F2.errors",{"title":471,"path":472,"stem":473,"icon":474},"Testing","\u002Flibraries\u002Ftesting","6.libraries\u002F3.testing","i-lucide-flask-conical",{"title":476,"path":477,"stem":478,"children":479,"page":34},"Extend","\u002Fextend","7.extend",[480,484,489,494,498,503,507,511,515,519,524,529],{"title":41,"path":481,"stem":482,"icon":483},"\u002Fextend\u002Foverview","7.extend\u002F0.overview","i-lucide-blocks",{"title":485,"path":486,"stem":487,"icon":488},"Stream","\u002Fextend\u002Fstream","7.extend\u002F1.stream","i-lucide-radio-tower",{"title":490,"path":491,"stem":492,"icon":493},"Custom framework","\u002Fextend\u002Fcustom-framework","7.extend\u002F10.custom-framework","i-lucide-puzzle",{"title":495,"path":496,"stem":497,"icon":488},"Diagnostics channel","\u002Fextend\u002Fdiagnostics-channel","7.extend\u002F11.diagnostics-channel",{"title":499,"path":500,"stem":501,"icon":502},"FS reader","\u002Fextend\u002Ffs-reader","7.extend\u002F2.fs-reader","i-lucide-folder-search",{"title":415,"path":504,"stem":505,"icon":506},"\u002Fextend\u002Fconsumer-recipes","7.extend\u002F3.consumer-recipes","i-lucide-chef-hat",{"title":508,"path":509,"stem":510,"icon":483},"Plugins","\u002Fextend\u002Fplugins","7.extend\u002F4.plugins",{"title":512,"path":513,"stem":514,"icon":443},"Custom enrichers","\u002Fextend\u002Fcustom-enrichers","7.extend\u002F5.custom-enrichers",{"title":516,"path":517,"stem":518,"icon":69},"Tail sampling","\u002Fextend\u002Ftail-sampling","7.extend\u002F6.tail-sampling",{"title":520,"path":521,"stem":522,"icon":523},"Identity headers","\u002Fextend\u002Fidentity-headers","7.extend\u002F7.identity-headers","i-lucide-fingerprint",{"title":525,"path":526,"stem":527,"icon":528},"Custom drains","\u002Fextend\u002Fcustom-drains","7.extend\u002F8.custom-drains","i-lucide-share-2",{"title":530,"path":531,"stem":532,"icon":533},"Drain pipeline","\u002Fextend\u002Fdrain-pipeline","7.extend\u002F9.drain-pipeline","i-lucide-workflow",{"title":436,"path":535,"stem":536,"children":537,"page":34},"\u002Freference","8.reference",[538,542,547,550,555,559,564,568],{"title":41,"path":539,"stem":540,"icon":541},"\u002Freference\u002Foverview","8.reference\u002F0.overview","i-lucide-book-marked",{"title":543,"path":544,"stem":545,"icon":546},"Configuration","\u002Freference\u002Fconfiguration","8.reference\u002F1.configuration","i-lucide-settings",{"title":383,"path":548,"stem":549,"icon":112},"\u002Freference\u002Fperformance","8.reference\u002F2.performance",{"title":551,"path":552,"stem":553,"icon":554},"Vite Plugin","\u002Freference\u002Fvite-plugin","8.reference\u002F3.vite-plugin","i-custom-vite",{"title":556,"path":557,"stem":558,"icon":388},"Best Practices","\u002Freference\u002Fbest-practices","8.reference\u002F4.best-practices",{"title":560,"path":561,"stem":562,"icon":563},"vs Other Loggers","\u002Freference\u002Fvs-other-loggers","8.reference\u002F5.vs-other-loggers","i-lucide-scale",{"title":565,"path":566,"stem":567,"icon":443},"Agent Skills","\u002Freference\u002Fagent-skills","8.reference\u002F6.agent-skills",{"title":569,"path":570,"stem":571,"icon":572},"Cost","\u002Freference\u002Fcost","8.reference\u002F7.cost","i-lucide-receipt",{"title":574,"path":575,"stem":576,"children":577,"page":34},"Compare","\u002Fcompare","9.compare",[578,582,586,590,594],{"title":579,"path":580,"stem":581,"icon":563},"evlog vs Pino","\u002Fcompare\u002Fpino","9.compare\u002F1.pino",{"title":583,"path":584,"stem":585,"icon":204},"evlog vs OpenTelemetry","\u002Fcompare\u002Fopentelemetry","9.compare\u002F2.opentelemetry",{"title":587,"path":588,"stem":589,"icon":563},"evlog vs LogTape","\u002Fcompare\u002Flogtape","9.compare\u002F3.logtape",{"title":591,"path":592,"stem":593,"icon":563},"evlog vs Winston: formats and request events","\u002Fcompare\u002Fwinston","9.compare\u002F4.winston",{"title":595,"path":596,"stem":597,"icon":563},"evlog vs Consola: reporters and request context","\u002Fcompare\u002Fconsola","9.compare\u002F5.consola",{"id":599,"title":445,"body":600,"description":4639,"extension":4640,"links":4641,"meta":4646,"navigation":4647,"path":446,"seo":4648,"stem":447,"__hash__":4649},"docs\u002F5.use-cases\u002F5.eve.md",{"type":601,"value":602,"toc":4618},"minimark",[603,635,653,698,703,774,777,782,862,866,873,1079,1090,1094,1120,1129,1410,1433,1437,1474,1478,1481,2164,2167,2550,2593,2597,2600,2830,2834,2840,2878,2894,2905,3007,3025,3029,3045,3055,3580,3593,3603,3636,3643,3646,3741,3748,3752,3755,4009,4075,4078,4223,4226,4232,4487,4491,4514,4518,4558,4580,4584,4614],[604,605,606,612,613,617,618,621,622,626,627,630,631,634],"p",{},[607,608,445],"a",{"href":609,"rel":610},"https:\u002F\u002Feve.dev\u002Fdocs\u002Fintroduction",[611],"nofollow"," ships built-in observability: ",[614,615,616],"strong",{},"Agent Runs"," on Vercel and optional ",[614,619,620],{},"OpenTelemetry"," spans via ",[623,624,625],"code",{},"agent\u002Finstrumentation.ts",". ",[623,628,629],{},"evlog\u002Feve"," adds a third layer: ",[614,632,633],{},"exportable wide events"," per turn with your full evlog pipeline (drains, enrichers, tail sampling, audit).",[636,637,639,641,642,645,646,648,649,652],"callout",{"color":638,"icon":13},"info",[623,640,629],{}," requires ",[614,643,644],{},"eve 0.30 or later",". eve is still in beta and stream event shapes may change before GA, so pin ",[623,647,445],{}," and ",[623,650,651],{},"evlog"," versions in production agents.",[654,655,658,661,686],"prompt",{":actions":656,"description":657,"icon":448},"[\"copy\",\"cursor\",\"claude\"]","Add evlog wide events to my eve agent",[604,659,660],{},"Add evlog wide events to my eve agent.",[662,663,664,668,671,674,677,680,683],"ul",{},[665,666,667],"li",{},"Install evlog: pnpm add evlog",[665,669,670],{},"Create agent\u002Fhooks\u002Fevlog.ts with defineEvlogHook from 'evlog\u002Feve'",[665,672,673],{},"Pass drain, enrich, and keep options (same as HTTP middleware integrations)",[665,675,676],{},"In tools, import useLogger from 'evlog\u002Feve' and call useLogger() inside execute(). The turn logger is bound via AsyncLocalStorage when defineEvlogHook() is registered; pass ctx only if ALS is unavailable in your runtime",[665,678,679],{},"User message content is omitted by default (message: 'omit'); use 'preview' or 'full' only after reviewing PII policy",[665,681,682],{},"Optionally add agent\u002Finstrumentation.ts with defineEvlogInstrumentation from 'evlog\u002Feve' to join OTel spans to the wide events",[665,684,685],{},"Keep eve Agent Runs. evlog\u002Feve is additive",[604,687,688,689,693,694],{},"Docs: ",[607,690,691],{"href":691,"rel":692},"https:\u002F\u002Fwww.evlog.dev\u002Fuse-cases\u002Feve",[611],"\nAdapters: ",[607,695,696],{"href":696,"rel":697},"https:\u002F\u002Fwww.evlog.dev\u002Fintegrate\u002Fadapters\u002Foverview",[611],[699,700,702],"h2",{"id":701},"when-to-use-what","When to use what",[704,705,706,719],"table",{},[707,708,709],"thead",{},[710,711,712,716],"tr",{},[713,714,715],"th",{},"Need",[713,717,718],{},"Use",[720,721,722,734,746,757],"tbody",{},[710,723,724,728],{},[725,726,727],"td",{},"Debug a session in Vercel",[725,729,730,731,733],{},"eve ",[614,732,616],{}," (automatic)",[710,735,736,739],{},[725,737,738],{},"Span-level traces in Datadog \u002F Honeycomb",[725,740,730,741,745],{},[614,742,743],{},[623,744,625],{}," + OTel exporter",[710,747,748,751],{},[725,749,750],{},"Wide events to Axiom \u002F Better Stack \u002F FS, billing, audit, tail sampling",[725,752,753],{},[614,754,755],{},[623,756,629],{},[710,758,759,762],{},[725,760,761],{},"Jumping from a span to its wide event, and back",[725,763,764,769,770],{},[614,765,766],{},[623,767,768],{},"defineEvlogInstrumentation()"," — ",[607,771,773],{"href":772},"#correlate-traces-with-wide-events","below",[699,775,25],{"id":776},"quick-start",[778,779,781],"h3",{"id":780},"_1-install","1. Install",[783,784,785,813,829,845],"code-group",{},[786,787,793],"pre",{"className":788,"code":789,"filename":790,"language":791,"meta":792,"style":792},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add evlog eve\n","pnpm","bash","",[623,794,795],{"__ignoreMap":792},[796,797,800,803,807,810],"span",{"class":798,"line":799},"line",1,[796,801,790],{"class":802},"sBMFI",[796,804,806],{"class":805},"sfazB"," add",[796,808,809],{"class":805}," evlog",[796,811,812],{"class":805}," eve\n",[786,814,817],{"className":788,"code":815,"filename":816,"language":791,"meta":792,"style":792},"bun add evlog eve\n","bun",[623,818,819],{"__ignoreMap":792},[796,820,821,823,825,827],{"class":798,"line":799},[796,822,816],{"class":802},[796,824,806],{"class":805},[796,826,809],{"class":805},[796,828,812],{"class":805},[786,830,833],{"className":788,"code":831,"filename":832,"language":791,"meta":792,"style":792},"yarn add evlog eve\n","yarn",[623,834,835],{"__ignoreMap":792},[796,836,837,839,841,843],{"class":798,"line":799},[796,838,832],{"class":802},[796,840,806],{"class":805},[796,842,809],{"class":805},[796,844,812],{"class":805},[786,846,849],{"className":788,"code":847,"filename":848,"language":791,"meta":792,"style":792},"npm install evlog eve\n","npm",[623,850,851],{"__ignoreMap":792},[796,852,853,855,858,860],{"class":798,"line":799},[796,854,848],{"class":802},[796,856,857],{"class":805}," install",[796,859,809],{"class":805},[796,861,812],{"class":805},[778,863,865],{"id":864},"_2-add-the-hook","2. Add the hook",[604,867,868,869,872],{},"Create ",[623,870,871],{},"agent\u002Fhooks\u002Fevlog.ts",":",[786,874,878],{"className":875,"code":876,"filename":871,"language":877,"meta":792,"style":792},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { defineEvlogHook } from 'evlog\u002Feve'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\nexport default defineEvlogHook({\n  init: { env: { service: 'my-agent' } },\n  drain: createAxiomDrain(),\n  enrich: (ctx) => {\n    ctx.event.region = process.env.VERCEL_REGION\n  },\n})\n","typescript",[623,879,880,908,929,936,954,990,1006,1031,1064,1070],{"__ignoreMap":792},[796,881,882,886,890,894,897,900,903,905],{"class":798,"line":799},[796,883,885],{"class":884},"s7zQu","import",[796,887,889],{"class":888},"sMK4o"," {",[796,891,893],{"class":892},"sTEyZ"," defineEvlogHook",[796,895,896],{"class":888}," }",[796,898,899],{"class":884}," from",[796,901,902],{"class":888}," '",[796,904,629],{"class":805},[796,906,907],{"class":888},"'\n",[796,909,911,913,915,918,920,922,924,927],{"class":798,"line":910},2,[796,912,885],{"class":884},[796,914,889],{"class":888},[796,916,917],{"class":892}," createAxiomDrain",[796,919,896],{"class":888},[796,921,899],{"class":884},[796,923,902],{"class":888},[796,925,926],{"class":805},"evlog\u002Faxiom",[796,928,907],{"class":888},[796,930,932],{"class":798,"line":931},3,[796,933,935],{"emptyLinePlaceholder":934},true,"\n",[796,937,939,942,945,948,951],{"class":798,"line":938},4,[796,940,941],{"class":884},"export",[796,943,944],{"class":884}," default",[796,946,893],{"class":947},"s2Zo4",[796,949,950],{"class":892},"(",[796,952,953],{"class":888},"{\n",[796,955,957,961,963,965,968,970,972,975,977,979,982,985,987],{"class":798,"line":956},5,[796,958,960],{"class":959},"swJcz","  init",[796,962,872],{"class":888},[796,964,889],{"class":888},[796,966,967],{"class":959}," env",[796,969,872],{"class":888},[796,971,889],{"class":888},[796,973,974],{"class":959}," service",[796,976,872],{"class":888},[796,978,902],{"class":888},[796,980,981],{"class":805},"my-agent",[796,983,984],{"class":888},"'",[796,986,896],{"class":888},[796,988,989],{"class":888}," },\n",[796,991,993,996,998,1000,1003],{"class":798,"line":992},6,[796,994,995],{"class":959},"  drain",[796,997,872],{"class":888},[796,999,917],{"class":947},[796,1001,1002],{"class":892},"()",[796,1004,1005],{"class":888},",\n",[796,1007,1009,1012,1014,1017,1021,1024,1028],{"class":798,"line":1008},7,[796,1010,1011],{"class":947},"  enrich",[796,1013,872],{"class":888},[796,1015,1016],{"class":888}," (",[796,1018,1020],{"class":1019},"sHdIc","ctx",[796,1022,1023],{"class":888},")",[796,1025,1027],{"class":1026},"spNyl"," =>",[796,1029,1030],{"class":888}," {\n",[796,1032,1034,1037,1040,1043,1045,1048,1051,1054,1056,1059,1061],{"class":798,"line":1033},8,[796,1035,1036],{"class":892},"    ctx",[796,1038,1039],{"class":888},".",[796,1041,1042],{"class":892},"event",[796,1044,1039],{"class":888},[796,1046,1047],{"class":892},"region",[796,1049,1050],{"class":888}," =",[796,1052,1053],{"class":892}," process",[796,1055,1039],{"class":888},[796,1057,1058],{"class":892},"env",[796,1060,1039],{"class":888},[796,1062,1063],{"class":892},"VERCEL_REGION\n",[796,1065,1067],{"class":798,"line":1066},9,[796,1068,1069],{"class":888},"  },\n",[796,1071,1073,1076],{"class":798,"line":1072},10,[796,1074,1075],{"class":888},"}",[796,1077,1078],{"class":892},")\n",[604,1080,1081,1082,1085,1086,1089],{},"eve auto-discovers hook files under ",[623,1083,1084],{},"agent\u002Fhooks\u002F",". No HTTP middleware, because the unit of work is an agent ",[614,1087,1088],{},"turn",", not a request.",[778,1091,1093],{"id":1092},"_3-log-business-context-from-tools","3. Log business context from tools",[604,1095,1096,1099,1100,1103,1104,1107,1108,1111,1112,1115,1116,1119],{},[623,1097,1098],{},"defineEvlogHook()"," binds the turn logger via ",[614,1101,1102],{},"AsyncLocalStorage"," on ",[623,1105,1106],{},"turn.started",". Inside tool ",[623,1109,1110],{},"execute()"," handlers, call ",[623,1113,1114],{},"useLogger()"," with no arguments, the same ergonomics as ",[623,1117,1118],{},"useLogger(event)"," in Nuxt or Hono.",[604,1121,1122,1123,1128],{},"In the ",[607,1124,1127],{"href":1125,"rel":1126},"https:\u002F\u002Fgithub.com\u002Fevloghq\u002Fevlog\u002Ftree\u002Fmain\u002Fexamples\u002Feve",[611],"example agent",", support tools attach customer and order context as the agent works a refund:",[786,1130,1133],{"className":875,"code":1131,"filename":1132,"language":877,"meta":792,"style":792},"import { defineTool } from 'eve\u002Ftools'\nimport { useLogger } from 'evlog\u002Feve'\nimport { z } from 'zod'\n\nexport default defineTool({\n  description: 'Look up an order by id.',\n  inputSchema: z.object({ orderId: z.string() }),\n  async execute({ orderId }) {\n    const order = await fetchOrder(orderId)\n    const log = useLogger()\n    log.set({ order: { id: order.id, amount: order.amount, status: order.status } })\n    return order\n  },\n})\n","agent\u002Ftools\u002Flookup_order.ts",[623,1134,1135,1155,1174,1194,1198,1210,1226,1266,1284,1307,1321,1389,1398,1403],{"__ignoreMap":792},[796,1136,1137,1139,1141,1144,1146,1148,1150,1153],{"class":798,"line":799},[796,1138,885],{"class":884},[796,1140,889],{"class":888},[796,1142,1143],{"class":892}," defineTool",[796,1145,896],{"class":888},[796,1147,899],{"class":884},[796,1149,902],{"class":888},[796,1151,1152],{"class":805},"eve\u002Ftools",[796,1154,907],{"class":888},[796,1156,1157,1159,1161,1164,1166,1168,1170,1172],{"class":798,"line":910},[796,1158,885],{"class":884},[796,1160,889],{"class":888},[796,1162,1163],{"class":892}," useLogger",[796,1165,896],{"class":888},[796,1167,899],{"class":884},[796,1169,902],{"class":888},[796,1171,629],{"class":805},[796,1173,907],{"class":888},[796,1175,1176,1178,1180,1183,1185,1187,1189,1192],{"class":798,"line":931},[796,1177,885],{"class":884},[796,1179,889],{"class":888},[796,1181,1182],{"class":892}," z",[796,1184,896],{"class":888},[796,1186,899],{"class":884},[796,1188,902],{"class":888},[796,1190,1191],{"class":805},"zod",[796,1193,907],{"class":888},[796,1195,1196],{"class":798,"line":938},[796,1197,935],{"emptyLinePlaceholder":934},[796,1199,1200,1202,1204,1206,1208],{"class":798,"line":956},[796,1201,941],{"class":884},[796,1203,944],{"class":884},[796,1205,1143],{"class":947},[796,1207,950],{"class":892},[796,1209,953],{"class":888},[796,1211,1212,1215,1217,1219,1222,1224],{"class":798,"line":992},[796,1213,1214],{"class":959},"  description",[796,1216,872],{"class":888},[796,1218,902],{"class":888},[796,1220,1221],{"class":805},"Look up an order by id.",[796,1223,984],{"class":888},[796,1225,1005],{"class":888},[796,1227,1228,1231,1233,1235,1237,1240,1242,1245,1248,1250,1252,1254,1257,1260,1262,1264],{"class":798,"line":1008},[796,1229,1230],{"class":959},"  inputSchema",[796,1232,872],{"class":888},[796,1234,1182],{"class":892},[796,1236,1039],{"class":888},[796,1238,1239],{"class":947},"object",[796,1241,950],{"class":892},[796,1243,1244],{"class":888},"{",[796,1246,1247],{"class":959}," orderId",[796,1249,872],{"class":888},[796,1251,1182],{"class":892},[796,1253,1039],{"class":888},[796,1255,1256],{"class":947},"string",[796,1258,1259],{"class":892},"() ",[796,1261,1075],{"class":888},[796,1263,1023],{"class":892},[796,1265,1005],{"class":888},[796,1267,1268,1271,1274,1277,1279,1282],{"class":798,"line":1033},[796,1269,1270],{"class":1026},"  async",[796,1272,1273],{"class":959}," execute",[796,1275,1276],{"class":888},"({",[796,1278,1247],{"class":1019},[796,1280,1281],{"class":888}," })",[796,1283,1030],{"class":888},[796,1285,1286,1289,1292,1294,1297,1300,1302,1305],{"class":798,"line":1066},[796,1287,1288],{"class":1026},"    const",[796,1290,1291],{"class":892}," order",[796,1293,1050],{"class":888},[796,1295,1296],{"class":884}," await",[796,1298,1299],{"class":947}," fetchOrder",[796,1301,950],{"class":959},[796,1303,1304],{"class":892},"orderId",[796,1306,1078],{"class":959},[796,1308,1309,1311,1314,1316,1318],{"class":798,"line":1072},[796,1310,1288],{"class":1026},[796,1312,1313],{"class":892}," log",[796,1315,1050],{"class":888},[796,1317,1163],{"class":947},[796,1319,1320],{"class":959},"()\n",[796,1322,1324,1327,1329,1332,1334,1336,1338,1340,1342,1345,1347,1349,1351,1354,1357,1360,1362,1364,1366,1369,1371,1374,1376,1378,1380,1383,1385,1387],{"class":798,"line":1323},11,[796,1325,1326],{"class":892},"    log",[796,1328,1039],{"class":888},[796,1330,1331],{"class":947},"set",[796,1333,950],{"class":959},[796,1335,1244],{"class":888},[796,1337,1291],{"class":959},[796,1339,872],{"class":888},[796,1341,889],{"class":888},[796,1343,1344],{"class":959}," id",[796,1346,872],{"class":888},[796,1348,1291],{"class":892},[796,1350,1039],{"class":888},[796,1352,1353],{"class":892},"id",[796,1355,1356],{"class":888},",",[796,1358,1359],{"class":959}," amount",[796,1361,872],{"class":888},[796,1363,1291],{"class":892},[796,1365,1039],{"class":888},[796,1367,1368],{"class":892},"amount",[796,1370,1356],{"class":888},[796,1372,1373],{"class":959}," status",[796,1375,872],{"class":888},[796,1377,1291],{"class":892},[796,1379,1039],{"class":888},[796,1381,1382],{"class":892},"status",[796,1384,896],{"class":888},[796,1386,896],{"class":888},[796,1388,1078],{"class":959},[796,1390,1392,1395],{"class":798,"line":1391},12,[796,1393,1394],{"class":884},"    return",[796,1396,1397],{"class":892}," order\n",[796,1399,1401],{"class":798,"line":1400},13,[796,1402,1069],{"class":888},[796,1404,1406,1408],{"class":798,"line":1405},14,[796,1407,1075],{"class":888},[796,1409,1078],{"class":892},[636,1411,1413,1428],{"color":1412,"icon":146},"neutral",[604,1414,1415,1418,1419,769,1421,1424,1425,1427],{},[614,1416,1417],{},"Resolution:"," pass the eve tool ",[623,1420,1020],{},[623,1422,1423],{},"useLogger(ctx)"," — when AsyncLocalStorage does not propagate, such as separate hook and tool bundles. With a standard eve agent layout and ",[623,1426,871],{}," registered, you should not need it.",[604,1429,1430,1432],{},[623,1431,1114],{}," never throws: when it cannot reach the turn's logger it warns once and returns a logger that accepts every call and emits nothing. A turn resumed in another process after a step boundary is the common case, and losing enrichment must never fail the tool that was being enriched. The turn keeps running; only its extra fields are dropped.",[778,1434,1436],{"id":1435},"_4-nextjs-web-chat-optional","4. Next.js web chat (optional)",[604,1438,1439,1440,1443,1444,1447,1448,1451,1452,1447,1455,1458,1459,1462,1463,1466,1467,1470,1471,1039],{},"Wrap ",[623,1441,1442],{},"next.config.ts"," with ",[623,1445,1446],{},"withEve()"," from ",[623,1449,1450],{},"eve\u002Fnext"," and use ",[623,1453,1454],{},"useEveAgent()",[623,1456,1457],{},"eve\u002Freact"," in your app. eve starts alongside ",[623,1460,1461],{},"next dev"," and proxies ",[623,1464,1465],{},"\u002Feve\u002Fv1\u002F*"," on the same origin, so tool calls, approvals, and ",[623,1468,1469],{},"ask_question"," work out of the box. See the ",[607,1472,1127],{"href":1125,"rel":1473},[611],[699,1475,1477],{"id":1476},"wide-event-shape","Wide event shape",[604,1479,1480],{},"Each completed turn emits one event:",[786,1482,1487],{"className":1483,"code":1484,"filename":1485,"language":1486,"meta":792,"style":792},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"method\": \"EVE\",\n  \"path\": \"\u002Fsessions\u002Fsess_abc\u002Fturns\u002Fturn_0\",\n  \"status\": 200,\n  \"duration\": \"7.9s\",\n  \"durationMs\": 7903,\n  \"service\": \"clearbill-support-agent\",\n  \"eve\": {\n    \"sessionId\": \"sess_abc\",\n    \"turnId\": \"turn_0\",\n    \"turnSequence\": 0,\n    \"phase\": \"awaiting-approval\",\n    \"sessionTurns\": 1\n  },\n  \"customer\": { \"slug\": \"acme-corp\", \"plan\": \"enterprise\" },\n  \"order\": { \"id\": \"4821\", \"amount\": 890, \"currency\": \"USD\" },\n  \"approval\": { \"status\": \"pending\", \"tool\": \"issue_refund\" },\n  \"ai\": {\n    \"model\": \"deepseek\u002Fdeepseek-v4-flash\",\n    \"provider\": \"deepseek\",\n    \"calls\": 2,\n    \"steps\": 2,\n    \"inputTokens\": 11724,\n    \"outputTokens\": 282,\n    \"finishReason\": \"tool-calls\",\n    \"tools\": [\n      { \"name\": \"lookup_customer\", \"durationMs\": 26, \"success\": true, \"inputTokens\": 8900 },\n      { \"name\": \"lookup_order\", \"durationMs\": 13, \"success\": true }\n    ]\n  }\n}\n","Wide Event — turn awaiting approval","json",[623,1488,1489,1493,1516,1536,1552,1572,1588,1608,1620,1641,1661,1677,1697,1711,1715,1765,1827,1876,1890,1911,1932,1949,1965,1982,1999,2020,2035,2097,2146,2152,2158],{"__ignoreMap":792},[796,1490,1491],{"class":798,"line":799},[796,1492,953],{"class":888},[796,1494,1495,1498,1501,1504,1506,1509,1512,1514],{"class":798,"line":910},[796,1496,1497],{"class":888},"  \"",[796,1499,1500],{"class":1026},"method",[796,1502,1503],{"class":888},"\"",[796,1505,872],{"class":888},[796,1507,1508],{"class":888}," \"",[796,1510,1511],{"class":805},"EVE",[796,1513,1503],{"class":888},[796,1515,1005],{"class":888},[796,1517,1518,1520,1523,1525,1527,1529,1532,1534],{"class":798,"line":931},[796,1519,1497],{"class":888},[796,1521,1522],{"class":1026},"path",[796,1524,1503],{"class":888},[796,1526,872],{"class":888},[796,1528,1508],{"class":888},[796,1530,1531],{"class":805},"\u002Fsessions\u002Fsess_abc\u002Fturns\u002Fturn_0",[796,1533,1503],{"class":888},[796,1535,1005],{"class":888},[796,1537,1538,1540,1542,1544,1546,1550],{"class":798,"line":938},[796,1539,1497],{"class":888},[796,1541,1382],{"class":1026},[796,1543,1503],{"class":888},[796,1545,872],{"class":888},[796,1547,1549],{"class":1548},"sbssI"," 200",[796,1551,1005],{"class":888},[796,1553,1554,1556,1559,1561,1563,1565,1568,1570],{"class":798,"line":956},[796,1555,1497],{"class":888},[796,1557,1558],{"class":1026},"duration",[796,1560,1503],{"class":888},[796,1562,872],{"class":888},[796,1564,1508],{"class":888},[796,1566,1567],{"class":805},"7.9s",[796,1569,1503],{"class":888},[796,1571,1005],{"class":888},[796,1573,1574,1576,1579,1581,1583,1586],{"class":798,"line":992},[796,1575,1497],{"class":888},[796,1577,1578],{"class":1026},"durationMs",[796,1580,1503],{"class":888},[796,1582,872],{"class":888},[796,1584,1585],{"class":1548}," 7903",[796,1587,1005],{"class":888},[796,1589,1590,1592,1595,1597,1599,1601,1604,1606],{"class":798,"line":1008},[796,1591,1497],{"class":888},[796,1593,1594],{"class":1026},"service",[796,1596,1503],{"class":888},[796,1598,872],{"class":888},[796,1600,1508],{"class":888},[796,1602,1603],{"class":805},"clearbill-support-agent",[796,1605,1503],{"class":888},[796,1607,1005],{"class":888},[796,1609,1610,1612,1614,1616,1618],{"class":798,"line":1033},[796,1611,1497],{"class":888},[796,1613,445],{"class":1026},[796,1615,1503],{"class":888},[796,1617,872],{"class":888},[796,1619,1030],{"class":888},[796,1621,1622,1625,1628,1630,1632,1634,1637,1639],{"class":798,"line":1066},[796,1623,1624],{"class":888},"    \"",[796,1626,1627],{"class":802},"sessionId",[796,1629,1503],{"class":888},[796,1631,872],{"class":888},[796,1633,1508],{"class":888},[796,1635,1636],{"class":805},"sess_abc",[796,1638,1503],{"class":888},[796,1640,1005],{"class":888},[796,1642,1643,1645,1648,1650,1652,1654,1657,1659],{"class":798,"line":1072},[796,1644,1624],{"class":888},[796,1646,1647],{"class":802},"turnId",[796,1649,1503],{"class":888},[796,1651,872],{"class":888},[796,1653,1508],{"class":888},[796,1655,1656],{"class":805},"turn_0",[796,1658,1503],{"class":888},[796,1660,1005],{"class":888},[796,1662,1663,1665,1668,1670,1672,1675],{"class":798,"line":1323},[796,1664,1624],{"class":888},[796,1666,1667],{"class":802},"turnSequence",[796,1669,1503],{"class":888},[796,1671,872],{"class":888},[796,1673,1674],{"class":1548}," 0",[796,1676,1005],{"class":888},[796,1678,1679,1681,1684,1686,1688,1690,1693,1695],{"class":798,"line":1391},[796,1680,1624],{"class":888},[796,1682,1683],{"class":802},"phase",[796,1685,1503],{"class":888},[796,1687,872],{"class":888},[796,1689,1508],{"class":888},[796,1691,1692],{"class":805},"awaiting-approval",[796,1694,1503],{"class":888},[796,1696,1005],{"class":888},[796,1698,1699,1701,1704,1706,1708],{"class":798,"line":1400},[796,1700,1624],{"class":888},[796,1702,1703],{"class":802},"sessionTurns",[796,1705,1503],{"class":888},[796,1707,872],{"class":888},[796,1709,1710],{"class":1548}," 1\n",[796,1712,1713],{"class":798,"line":1405},[796,1714,1069],{"class":888},[796,1716,1718,1720,1723,1725,1727,1729,1731,1734,1736,1738,1740,1743,1745,1747,1749,1752,1754,1756,1758,1761,1763],{"class":798,"line":1717},15,[796,1719,1497],{"class":888},[796,1721,1722],{"class":1026},"customer",[796,1724,1503],{"class":888},[796,1726,872],{"class":888},[796,1728,889],{"class":888},[796,1730,1508],{"class":888},[796,1732,1733],{"class":802},"slug",[796,1735,1503],{"class":888},[796,1737,872],{"class":888},[796,1739,1508],{"class":888},[796,1741,1742],{"class":805},"acme-corp",[796,1744,1503],{"class":888},[796,1746,1356],{"class":888},[796,1748,1508],{"class":888},[796,1750,1751],{"class":802},"plan",[796,1753,1503],{"class":888},[796,1755,872],{"class":888},[796,1757,1508],{"class":888},[796,1759,1760],{"class":805},"enterprise",[796,1762,1503],{"class":888},[796,1764,989],{"class":888},[796,1766,1768,1770,1773,1775,1777,1779,1781,1783,1785,1787,1789,1792,1794,1796,1798,1800,1802,1804,1807,1809,1811,1814,1816,1818,1820,1823,1825],{"class":798,"line":1767},16,[796,1769,1497],{"class":888},[796,1771,1772],{"class":1026},"order",[796,1774,1503],{"class":888},[796,1776,872],{"class":888},[796,1778,889],{"class":888},[796,1780,1508],{"class":888},[796,1782,1353],{"class":802},[796,1784,1503],{"class":888},[796,1786,872],{"class":888},[796,1788,1508],{"class":888},[796,1790,1791],{"class":805},"4821",[796,1793,1503],{"class":888},[796,1795,1356],{"class":888},[796,1797,1508],{"class":888},[796,1799,1368],{"class":802},[796,1801,1503],{"class":888},[796,1803,872],{"class":888},[796,1805,1806],{"class":1548}," 890",[796,1808,1356],{"class":888},[796,1810,1508],{"class":888},[796,1812,1813],{"class":802},"currency",[796,1815,1503],{"class":888},[796,1817,872],{"class":888},[796,1819,1508],{"class":888},[796,1821,1822],{"class":805},"USD",[796,1824,1503],{"class":888},[796,1826,989],{"class":888},[796,1828,1830,1832,1835,1837,1839,1841,1843,1845,1847,1849,1851,1854,1856,1858,1860,1863,1865,1867,1869,1872,1874],{"class":798,"line":1829},17,[796,1831,1497],{"class":888},[796,1833,1834],{"class":1026},"approval",[796,1836,1503],{"class":888},[796,1838,872],{"class":888},[796,1840,889],{"class":888},[796,1842,1508],{"class":888},[796,1844,1382],{"class":802},[796,1846,1503],{"class":888},[796,1848,872],{"class":888},[796,1850,1508],{"class":888},[796,1852,1853],{"class":805},"pending",[796,1855,1503],{"class":888},[796,1857,1356],{"class":888},[796,1859,1508],{"class":888},[796,1861,1862],{"class":802},"tool",[796,1864,1503],{"class":888},[796,1866,872],{"class":888},[796,1868,1508],{"class":888},[796,1870,1871],{"class":805},"issue_refund",[796,1873,1503],{"class":888},[796,1875,989],{"class":888},[796,1877,1879,1881,1884,1886,1888],{"class":798,"line":1878},18,[796,1880,1497],{"class":888},[796,1882,1883],{"class":1026},"ai",[796,1885,1503],{"class":888},[796,1887,872],{"class":888},[796,1889,1030],{"class":888},[796,1891,1893,1895,1898,1900,1902,1904,1907,1909],{"class":798,"line":1892},19,[796,1894,1624],{"class":888},[796,1896,1897],{"class":802},"model",[796,1899,1503],{"class":888},[796,1901,872],{"class":888},[796,1903,1508],{"class":888},[796,1905,1906],{"class":805},"deepseek\u002Fdeepseek-v4-flash",[796,1908,1503],{"class":888},[796,1910,1005],{"class":888},[796,1912,1914,1916,1919,1921,1923,1925,1928,1930],{"class":798,"line":1913},20,[796,1915,1624],{"class":888},[796,1917,1918],{"class":802},"provider",[796,1920,1503],{"class":888},[796,1922,872],{"class":888},[796,1924,1508],{"class":888},[796,1926,1927],{"class":805},"deepseek",[796,1929,1503],{"class":888},[796,1931,1005],{"class":888},[796,1933,1935,1937,1940,1942,1944,1947],{"class":798,"line":1934},21,[796,1936,1624],{"class":888},[796,1938,1939],{"class":802},"calls",[796,1941,1503],{"class":888},[796,1943,872],{"class":888},[796,1945,1946],{"class":1548}," 2",[796,1948,1005],{"class":888},[796,1950,1952,1954,1957,1959,1961,1963],{"class":798,"line":1951},22,[796,1953,1624],{"class":888},[796,1955,1956],{"class":802},"steps",[796,1958,1503],{"class":888},[796,1960,872],{"class":888},[796,1962,1946],{"class":1548},[796,1964,1005],{"class":888},[796,1966,1968,1970,1973,1975,1977,1980],{"class":798,"line":1967},23,[796,1969,1624],{"class":888},[796,1971,1972],{"class":802},"inputTokens",[796,1974,1503],{"class":888},[796,1976,872],{"class":888},[796,1978,1979],{"class":1548}," 11724",[796,1981,1005],{"class":888},[796,1983,1985,1987,1990,1992,1994,1997],{"class":798,"line":1984},24,[796,1986,1624],{"class":888},[796,1988,1989],{"class":802},"outputTokens",[796,1991,1503],{"class":888},[796,1993,872],{"class":888},[796,1995,1996],{"class":1548}," 282",[796,1998,1005],{"class":888},[796,2000,2002,2004,2007,2009,2011,2013,2016,2018],{"class":798,"line":2001},25,[796,2003,1624],{"class":888},[796,2005,2006],{"class":802},"finishReason",[796,2008,1503],{"class":888},[796,2010,872],{"class":888},[796,2012,1508],{"class":888},[796,2014,2015],{"class":805},"tool-calls",[796,2017,1503],{"class":888},[796,2019,1005],{"class":888},[796,2021,2023,2025,2028,2030,2032],{"class":798,"line":2022},26,[796,2024,1624],{"class":888},[796,2026,2027],{"class":802},"tools",[796,2029,1503],{"class":888},[796,2031,872],{"class":888},[796,2033,2034],{"class":888}," [\n",[796,2036,2038,2041,2043,2046,2048,2050,2052,2055,2057,2059,2061,2063,2065,2067,2070,2072,2074,2077,2079,2081,2084,2086,2088,2090,2092,2095],{"class":798,"line":2037},27,[796,2039,2040],{"class":888},"      {",[796,2042,1508],{"class":888},[796,2044,2045],{"class":1548},"name",[796,2047,1503],{"class":888},[796,2049,872],{"class":888},[796,2051,1508],{"class":888},[796,2053,2054],{"class":805},"lookup_customer",[796,2056,1503],{"class":888},[796,2058,1356],{"class":888},[796,2060,1508],{"class":888},[796,2062,1578],{"class":1548},[796,2064,1503],{"class":888},[796,2066,872],{"class":888},[796,2068,2069],{"class":1548}," 26",[796,2071,1356],{"class":888},[796,2073,1508],{"class":888},[796,2075,2076],{"class":1548},"success",[796,2078,1503],{"class":888},[796,2080,872],{"class":888},[796,2082,2083],{"class":888}," true,",[796,2085,1508],{"class":888},[796,2087,1972],{"class":1548},[796,2089,1503],{"class":888},[796,2091,872],{"class":888},[796,2093,2094],{"class":1548}," 8900",[796,2096,989],{"class":888},[796,2098,2100,2102,2104,2106,2108,2110,2112,2115,2117,2119,2121,2123,2125,2127,2130,2132,2134,2136,2138,2140,2143],{"class":798,"line":2099},28,[796,2101,2040],{"class":888},[796,2103,1508],{"class":888},[796,2105,2045],{"class":1548},[796,2107,1503],{"class":888},[796,2109,872],{"class":888},[796,2111,1508],{"class":888},[796,2113,2114],{"class":805},"lookup_order",[796,2116,1503],{"class":888},[796,2118,1356],{"class":888},[796,2120,1508],{"class":888},[796,2122,1578],{"class":1548},[796,2124,1503],{"class":888},[796,2126,872],{"class":888},[796,2128,2129],{"class":1548}," 13",[796,2131,1356],{"class":888},[796,2133,1508],{"class":888},[796,2135,2076],{"class":1548},[796,2137,1503],{"class":888},[796,2139,872],{"class":888},[796,2141,2142],{"class":888}," true",[796,2144,2145],{"class":888}," }\n",[796,2147,2149],{"class":798,"line":2148},29,[796,2150,2151],{"class":888},"    ]\n",[796,2153,2155],{"class":798,"line":2154},30,[796,2156,2157],{"class":888},"  }\n",[796,2159,2161],{"class":798,"line":2160},31,[796,2162,2163],{"class":888},"}\n",[604,2165,2166],{},"After approval, the next turn carries the outcome:",[786,2168,2171],{"className":1483,"code":2169,"filename":2170,"language":1486,"meta":792,"style":792},"{\n  \"path\": \"\u002Fsessions\u002Fsess_abc\u002Fturns\u002Fturn_1\",\n  \"eve\": {\n    \"sessionId\": \"sess_abc\",\n    \"turnId\": \"turn_1\",\n    \"turnSequence\": 1,\n    \"sessionTurns\": 2\n  },\n  \"refund\": { \"orderId\": \"4821\", \"amount\": 890, \"status\": \"refunded\" },\n  \"audit\": { \"action\": \"refund.issued\", \"target\": { \"type\": \"order\", \"id\": \"4821\" } },\n  \"approval\": { \"status\": \"approved\", \"tool\": \"issue_refund\" },\n  \"ai\": {\n    \"tools\": [{ \"name\": \"issue_refund\", \"durationMs\": 993, \"success\": true }],\n    \"finishReason\": \"stop\"\n  }\n}\n","Wide Event — refund completed",[623,2172,2173,2177,2196,2208,2226,2245,2260,2273,2277,2335,2412,2457,2469,2524,2542,2546],{"__ignoreMap":792},[796,2174,2175],{"class":798,"line":799},[796,2176,953],{"class":888},[796,2178,2179,2181,2183,2185,2187,2189,2192,2194],{"class":798,"line":910},[796,2180,1497],{"class":888},[796,2182,1522],{"class":1026},[796,2184,1503],{"class":888},[796,2186,872],{"class":888},[796,2188,1508],{"class":888},[796,2190,2191],{"class":805},"\u002Fsessions\u002Fsess_abc\u002Fturns\u002Fturn_1",[796,2193,1503],{"class":888},[796,2195,1005],{"class":888},[796,2197,2198,2200,2202,2204,2206],{"class":798,"line":931},[796,2199,1497],{"class":888},[796,2201,445],{"class":1026},[796,2203,1503],{"class":888},[796,2205,872],{"class":888},[796,2207,1030],{"class":888},[796,2209,2210,2212,2214,2216,2218,2220,2222,2224],{"class":798,"line":938},[796,2211,1624],{"class":888},[796,2213,1627],{"class":802},[796,2215,1503],{"class":888},[796,2217,872],{"class":888},[796,2219,1508],{"class":888},[796,2221,1636],{"class":805},[796,2223,1503],{"class":888},[796,2225,1005],{"class":888},[796,2227,2228,2230,2232,2234,2236,2238,2241,2243],{"class":798,"line":956},[796,2229,1624],{"class":888},[796,2231,1647],{"class":802},[796,2233,1503],{"class":888},[796,2235,872],{"class":888},[796,2237,1508],{"class":888},[796,2239,2240],{"class":805},"turn_1",[796,2242,1503],{"class":888},[796,2244,1005],{"class":888},[796,2246,2247,2249,2251,2253,2255,2258],{"class":798,"line":992},[796,2248,1624],{"class":888},[796,2250,1667],{"class":802},[796,2252,1503],{"class":888},[796,2254,872],{"class":888},[796,2256,2257],{"class":1548}," 1",[796,2259,1005],{"class":888},[796,2261,2262,2264,2266,2268,2270],{"class":798,"line":1008},[796,2263,1624],{"class":888},[796,2265,1703],{"class":802},[796,2267,1503],{"class":888},[796,2269,872],{"class":888},[796,2271,2272],{"class":1548}," 2\n",[796,2274,2275],{"class":798,"line":1033},[796,2276,1069],{"class":888},[796,2278,2279,2281,2284,2286,2288,2290,2292,2294,2296,2298,2300,2302,2304,2306,2308,2310,2312,2314,2316,2318,2320,2322,2324,2326,2328,2331,2333],{"class":798,"line":1066},[796,2280,1497],{"class":888},[796,2282,2283],{"class":1026},"refund",[796,2285,1503],{"class":888},[796,2287,872],{"class":888},[796,2289,889],{"class":888},[796,2291,1508],{"class":888},[796,2293,1304],{"class":802},[796,2295,1503],{"class":888},[796,2297,872],{"class":888},[796,2299,1508],{"class":888},[796,2301,1791],{"class":805},[796,2303,1503],{"class":888},[796,2305,1356],{"class":888},[796,2307,1508],{"class":888},[796,2309,1368],{"class":802},[796,2311,1503],{"class":888},[796,2313,872],{"class":888},[796,2315,1806],{"class":1548},[796,2317,1356],{"class":888},[796,2319,1508],{"class":888},[796,2321,1382],{"class":802},[796,2323,1503],{"class":888},[796,2325,872],{"class":888},[796,2327,1508],{"class":888},[796,2329,2330],{"class":805},"refunded",[796,2332,1503],{"class":888},[796,2334,989],{"class":888},[796,2336,2337,2339,2342,2344,2346,2348,2350,2353,2355,2357,2359,2362,2364,2366,2368,2371,2373,2375,2377,2379,2382,2384,2386,2388,2390,2392,2394,2396,2398,2400,2402,2404,2406,2408,2410],{"class":798,"line":1072},[796,2338,1497],{"class":888},[796,2340,2341],{"class":1026},"audit",[796,2343,1503],{"class":888},[796,2345,872],{"class":888},[796,2347,889],{"class":888},[796,2349,1508],{"class":888},[796,2351,2352],{"class":802},"action",[796,2354,1503],{"class":888},[796,2356,872],{"class":888},[796,2358,1508],{"class":888},[796,2360,2361],{"class":805},"refund.issued",[796,2363,1503],{"class":888},[796,2365,1356],{"class":888},[796,2367,1508],{"class":888},[796,2369,2370],{"class":802},"target",[796,2372,1503],{"class":888},[796,2374,872],{"class":888},[796,2376,889],{"class":888},[796,2378,1508],{"class":888},[796,2380,2381],{"class":1548},"type",[796,2383,1503],{"class":888},[796,2385,872],{"class":888},[796,2387,1508],{"class":888},[796,2389,1772],{"class":805},[796,2391,1503],{"class":888},[796,2393,1356],{"class":888},[796,2395,1508],{"class":888},[796,2397,1353],{"class":1548},[796,2399,1503],{"class":888},[796,2401,872],{"class":888},[796,2403,1508],{"class":888},[796,2405,1791],{"class":805},[796,2407,1503],{"class":888},[796,2409,896],{"class":888},[796,2411,989],{"class":888},[796,2413,2414,2416,2418,2420,2422,2424,2426,2428,2430,2432,2434,2437,2439,2441,2443,2445,2447,2449,2451,2453,2455],{"class":798,"line":1323},[796,2415,1497],{"class":888},[796,2417,1834],{"class":1026},[796,2419,1503],{"class":888},[796,2421,872],{"class":888},[796,2423,889],{"class":888},[796,2425,1508],{"class":888},[796,2427,1382],{"class":802},[796,2429,1503],{"class":888},[796,2431,872],{"class":888},[796,2433,1508],{"class":888},[796,2435,2436],{"class":805},"approved",[796,2438,1503],{"class":888},[796,2440,1356],{"class":888},[796,2442,1508],{"class":888},[796,2444,1862],{"class":802},[796,2446,1503],{"class":888},[796,2448,872],{"class":888},[796,2450,1508],{"class":888},[796,2452,1871],{"class":805},[796,2454,1503],{"class":888},[796,2456,989],{"class":888},[796,2458,2459,2461,2463,2465,2467],{"class":798,"line":1391},[796,2460,1497],{"class":888},[796,2462,1883],{"class":1026},[796,2464,1503],{"class":888},[796,2466,872],{"class":888},[796,2468,1030],{"class":888},[796,2470,2471,2473,2475,2477,2479,2482,2484,2486,2488,2490,2492,2494,2496,2498,2500,2502,2504,2506,2509,2511,2513,2515,2517,2519,2521],{"class":798,"line":1400},[796,2472,1624],{"class":888},[796,2474,2027],{"class":802},[796,2476,1503],{"class":888},[796,2478,872],{"class":888},[796,2480,2481],{"class":888}," [{",[796,2483,1508],{"class":888},[796,2485,2045],{"class":1548},[796,2487,1503],{"class":888},[796,2489,872],{"class":888},[796,2491,1508],{"class":888},[796,2493,1871],{"class":805},[796,2495,1503],{"class":888},[796,2497,1356],{"class":888},[796,2499,1508],{"class":888},[796,2501,1578],{"class":1548},[796,2503,1503],{"class":888},[796,2505,872],{"class":888},[796,2507,2508],{"class":1548}," 993",[796,2510,1356],{"class":888},[796,2512,1508],{"class":888},[796,2514,2076],{"class":1548},[796,2516,1503],{"class":888},[796,2518,872],{"class":888},[796,2520,2142],{"class":888},[796,2522,2523],{"class":888}," }],\n",[796,2525,2526,2528,2530,2532,2534,2536,2539],{"class":798,"line":1405},[796,2527,1624],{"class":888},[796,2529,2006],{"class":802},[796,2531,1503],{"class":888},[796,2533,872],{"class":888},[796,2535,1508],{"class":888},[796,2537,2538],{"class":805},"stop",[796,2540,2541],{"class":888},"\"\n",[796,2543,2544],{"class":798,"line":1717},[796,2545,2157],{"class":888},[796,2547,2548],{"class":798,"line":1767},[796,2549,2163],{"class":888},[604,2551,2552,2553,2556,2557,2556,2560,2563,2564,2566,2567,2570,2571,2574,2575,2578,2579,2556,2581,2556,2584,2556,2587,2556,2590,1039],{},"Token usage and tool executions are accumulated from eve stream events (",[623,2554,2555],{},"step.completed",", ",[623,2558,2559],{},"actions.requested",[623,2561,2562],{},"action.result","). Business fields set via ",[623,2565,1114],{}," carry across turns in the same session. Link turns in analytics with ",[623,2568,2569],{},"eve.sessionId"," + ",[623,2572,2573],{},"eve.turnSequence",", and each event stays self-contained. ",[623,2576,2577],{},"eve.phase"," is only set for non-routine endings: ",[623,2580,1692],{},[623,2582,2583],{},"awaiting-authorization",[623,2585,2586],{},"rejected",[623,2588,2589],{},"cancelled",[623,2591,2592],{},"failed",[778,2594,2596],{"id":2595},"everything-the-turn-can-report","Everything the turn can report",[604,2598,2599],{},"Beyond the identifiers above, a turn records what eve reports about it. Every field is optional and appears only when the turn produced it.",[704,2601,2602,2612],{},[707,2603,2604],{},[710,2605,2606,2609],{},[713,2607,2608],{},"Field",[713,2610,2611],{},"What it tells you",[720,2613,2614,2634,2661,2674,2691,2705,2718,2728,2744,2754,2764,2778,2795,2820],{},[710,2615,2616,2621],{},[725,2617,2618],{},[623,2619,2620],{},"eve.runtime",[725,2622,2623,2624,2627,2628,2627,2631],{},"eve version, agent id, model, and the deployed ",[623,2625,2626],{},"gitSha"," \u002F ",[623,2629,2630],{},"gitBranch",[623,2632,2633],{},"deployedAt",[710,2635,2636,2641],{},[725,2637,2638],{},[623,2639,2640],{},"eve.caller",[725,2642,2643,2644,2556,2647,648,2650,2653,2654,648,2657,2660],{},"Who triggered the turn: ",[623,2645,2646],{},"principalId",[623,2648,2649],{},"principalType",[623,2651,2652],{},"authenticator",". On a multi-user channel this is what you group cost and volume by. ",[623,2655,2656],{},"subject",[623,2658,2659],{},"attributes"," are never recorded — a channel may put a name or an email in them",[710,2662,2663,2668],{},[725,2664,2665],{},[623,2666,2667],{},"eve.parent",[725,2669,2670,2671],{},"Parent and root session ids for a subagent run — rebuild the delegation tree with ",[623,2672,2673],{},"rootSessionId",[710,2675,2676,2681],{},[725,2677,2678],{},[623,2679,2680],{},"eve.authorizations",[725,2682,2683,2684,2556,2687,2690],{},"Connection sign-ins with their ",[623,2685,2686],{},"outcome",[623,2688,2689],{},"reason"," and duration",[710,2692,2693,2698],{},[725,2694,2695],{},[623,2696,2697],{},"eve.compaction",[725,2699,2700,2701,2704],{},"How many compactions ran, on which model, and ",[623,2702,2703],{},"inputTokensAtTrigger"," — how full the context was when the first one fired",[710,2706,2707,2715],{},[725,2708,2709,2627,2712],{},[623,2710,2711],{},"eve.stepFailures",[623,2713,2714],{},"eve.failedSteps",[725,2716,2717],{},"Model calls that failed, including on a turn that then succeeded on retry",[710,2719,2720,2725],{},[725,2721,2722],{},[623,2723,2724],{},"eve.subagents",[725,2726,2727],{},"Delegations with their status and duration",[710,2729,2730,2735],{},[725,2731,2732],{},[623,2733,2734],{},"eve.reasoning",[725,2736,2737,648,2740,2743],{},[623,2738,2739],{},"blocks",[623,2741,2742],{},"chars"," — the size of the model's thinking, never its content",[710,2745,2746,2751],{},[725,2747,2748],{},[623,2749,2750],{},"eve.result",[725,2752,2753],{},"The structured result, for an agent with an output schema",[710,2755,2756,2761],{},[725,2757,2758],{},[623,2759,2760],{},"eve.contextCleared",[725,2762,2763],{},"The durable history was wiped during this turn",[710,2765,2766,2771],{},[725,2767,2768],{},[623,2769,2770],{},"message.responseChars",[725,2772,2773,2774,2777],{},"Length of the agent's response, recorded whatever the ",[623,2775,2776],{},"message"," mode",[710,2779,2780,2785],{},[725,2781,2782],{},[623,2783,2784],{},"ai.costUsd",[725,2786,2787,2788,2791,2792],{},"Cost as reported by eve. ",[623,2789,2790],{},"ai.estimatedCost"," is the fallback computed from ",[623,2793,2794],{},"cost",[710,2796,2797,2805],{},[725,2798,2799,2627,2802],{},[623,2800,2801],{},"ai.model",[623,2803,2804],{},"ai.provider",[725,2806,2807,2808,2810,2811,2813,2814,2816,2817],{},"The gateway slug (",[623,2809,1906],{},") and the resolved provider (",[623,2812,1927],{},") that served the turn. ",[623,2815,2804],{}," is split from the model id eve reports on ",[623,2818,2819],{},"session.started",[710,2821,2822,2827],{},[725,2823,2824],{},[623,2825,2826],{},"ai.tools[].inputTokens",[725,2828,2829],{},"The input tokens a tool result added to the next model call: the delta between the step that called the tool and the step that consumed its result. Parallel results in one step share the delta evenly; left unset when the turn ended before the result was consumed, or when a compaction reset the context",[699,2831,2833],{"id":2832},"correlate-traces-with-wide-events","Correlate traces with wide events",[604,2835,2836,2837,2839],{},"A wide event and an Agent Runs span describe the same turn, but nothing joins them on its own. ",[623,2838,768],{}," stamps evlog's turn identity onto eve's AI SDK spans:",[786,2841,2843],{"className":875,"code":2842,"filename":625,"language":877,"meta":792,"style":792},"import { defineEvlogInstrumentation } from 'evlog\u002Feve'\n\nexport default defineEvlogInstrumentation()\n",[623,2844,2845,2864,2868],{"__ignoreMap":792},[796,2846,2847,2849,2851,2854,2856,2858,2860,2862],{"class":798,"line":799},[796,2848,885],{"class":884},[796,2850,889],{"class":888},[796,2852,2853],{"class":892}," defineEvlogInstrumentation",[796,2855,896],{"class":888},[796,2857,899],{"class":884},[796,2859,902],{"class":888},[796,2861,629],{"class":805},[796,2863,907],{"class":888},[796,2865,2866],{"class":798,"line":910},[796,2867,935],{"emptyLinePlaceholder":934},[796,2869,2870,2872,2874,2876],{"class":798,"line":931},[796,2871,941],{"class":884},[796,2873,944],{"class":884},[796,2875,2853],{"class":947},[796,2877,1320],{"class":892},[604,2879,2880,2881,648,2884,2887,2888,648,2891,2893],{},"Every model-call span, and its children, then carries ",[623,2882,2883],{},"evlog.request_id",[623,2885,2886],{},"evlog.session_id",", the same values the wide event reports as ",[623,2889,2890],{},"requestId",[623,2892,2569],{},". Jump from a trace in Braintrust, Datadog or Agent Runs straight to the event in your drain, and back.",[604,2895,2896,2897,2900,2901,2904],{},"Without ",[623,2898,2899],{},"setup",", OpenTelemetry export is untouched: eve keeps writing its local traces, readable with ",[623,2902,2903],{},"eve traces",". Pass one to export elsewhere:",[786,2906,2908],{"className":875,"code":2907,"filename":625,"language":877,"meta":792,"style":792},"import { defineEvlogInstrumentation } from 'evlog\u002Feve'\nimport { registerOTel } from '@vercel\u002Fotel'\n\nexport default defineEvlogInstrumentation({\n  setup: ({ agentName }) => registerOTel({ serviceName: agentName }),\n})\n",[623,2909,2910,2928,2948,2952,2964,3001],{"__ignoreMap":792},[796,2911,2912,2914,2916,2918,2920,2922,2924,2926],{"class":798,"line":799},[796,2913,885],{"class":884},[796,2915,889],{"class":888},[796,2917,2853],{"class":892},[796,2919,896],{"class":888},[796,2921,899],{"class":884},[796,2923,902],{"class":888},[796,2925,629],{"class":805},[796,2927,907],{"class":888},[796,2929,2930,2932,2934,2937,2939,2941,2943,2946],{"class":798,"line":910},[796,2931,885],{"class":884},[796,2933,889],{"class":888},[796,2935,2936],{"class":892}," registerOTel",[796,2938,896],{"class":888},[796,2940,899],{"class":884},[796,2942,902],{"class":888},[796,2944,2945],{"class":805},"@vercel\u002Fotel",[796,2947,907],{"class":888},[796,2949,2950],{"class":798,"line":931},[796,2951,935],{"emptyLinePlaceholder":934},[796,2953,2954,2956,2958,2960,2962],{"class":798,"line":938},[796,2955,941],{"class":884},[796,2957,944],{"class":884},[796,2959,2853],{"class":947},[796,2961,950],{"class":892},[796,2963,953],{"class":888},[796,2965,2966,2969,2971,2974,2977,2979,2981,2983,2985,2987,2990,2992,2995,2997,2999],{"class":798,"line":956},[796,2967,2968],{"class":947},"  setup",[796,2970,872],{"class":888},[796,2972,2973],{"class":888}," ({",[796,2975,2976],{"class":1019}," agentName",[796,2978,1281],{"class":888},[796,2980,1027],{"class":1026},[796,2982,2936],{"class":947},[796,2984,950],{"class":892},[796,2986,1244],{"class":888},[796,2988,2989],{"class":959}," serviceName",[796,2991,872],{"class":888},[796,2993,2994],{"class":892}," agentName ",[796,2996,1075],{"class":888},[796,2998,1023],{"class":892},[796,3000,1005],{"class":888},[796,3002,3003,3005],{"class":798,"line":992},[796,3004,1075],{"class":888},[796,3006,1078],{"class":892},[604,3008,3009,2556,3012,2556,3015,648,3018,3021,3022,1039],{},[623,3010,3011],{},"functionId",[623,3013,3014],{},"recordInputs",[623,3016,3017],{},"recordOutputs",[623,3019,3020],{},"traceChannelRequests"," pass straight through to eve's ",[623,3023,3024],{},"defineInstrumentation",[778,3026,3028],{"id":3027},"alongside-another-observability-backend","Alongside another observability backend",[604,3030,3031,3033,3034,3036,3037,3040,3041,3044],{},[623,3032,768],{}," is the shortcut for an agent whose instrumentation is evlog's alone. It owns the file, and an agent has exactly one ",[623,3035,625],{},", so every observability item in eve's registry writes that same path, which is why ",[623,3038,3039],{},"eve add instrumentation\u002Fsentry"," after ",[623,3042,3043],{},"eve add instrumentation\u002Fposthog"," refuses rather than clobbering the first.",[604,3046,3047,3048,3050,3051,3054],{},"Once another backend is in play, write the file yourself with eve's own ",[623,3049,3024],{}," and spread ",[623,3052,3053],{},"evlogRuntimeContext"," into your runtime context. evlog contributes attributes to your instrumentation instead of wrapping it:",[786,3056,3058],{"className":875,"code":3057,"filename":625,"language":877,"meta":792,"style":792},"import { BatchSpanProcessor, SimpleSpanProcessor } from '@opentelemetry\u002Fsdk-trace-base'\nimport { PostHogTraceExporter } from '@posthog\u002Fai\u002Fotel'\nimport { OTLPHttpProtoTraceExporter, registerOTel } from '@vercel\u002Fotel'\nimport { defineInstrumentation } from 'eve\u002Finstrumentation'\nimport { evlogRuntimeContext } from 'evlog\u002Feve'\n\nexport default defineInstrumentation({\n  \u002F\u002F One provider, one span processor per backend. Items that generate\n  \u002F\u002F `traceExporter` (Sentry, Datadog, Arize, Jaeger, Braintrust, Honeycomb)\n  \u002F\u002F become an entry in this array. Call registerOTel once, not once per backend.\n  setup: ({ agentName }) => registerOTel({\n    serviceName: agentName,\n    spanProcessors: [\n      new SimpleSpanProcessor(new PostHogTraceExporter({\n        projectToken: process.env.POSTHOG_PROJECT_TOKEN!,\n      })),\n      new BatchSpanProcessor(new OTLPHttpProtoTraceExporter({\n        url: process.env.SENTRY_OTLP_TRACES_ENDPOINT!,\n        headers: { 'x-sentry-auth': `sentry sentry_key=${process.env.SENTRY_PUBLIC_KEY}` },\n      })),\n    ],\n  }),\n  events: {\n    'step.started': (input) => {\n      const principalId = input.session.auth.initiator?.principalId\n        ?? input.session.auth.current?.principalId\n      return {\n        runtimeContext: {\n          ...evlogRuntimeContext(input),\n          \u002F\u002F Omitted rather than blank: an empty attribute reads as an empty id.\n          ...(principalId ? { posthog_distinct_id: principalId } : {}),\n        },\n      }\n    },\n  },\n})\n",[623,3059,3060,3085,3105,3128,3148,3167,3171,3183,3189,3194,3199,3219,3230,3239,3257,3278,3288,3304,3324,3368,3376,3383,3392,3401,3424,3458,3482,3489,3498,3513,3518,3550,3556,3562,3568,3573],{"__ignoreMap":792},[796,3061,3062,3064,3066,3069,3071,3074,3076,3078,3080,3083],{"class":798,"line":799},[796,3063,885],{"class":884},[796,3065,889],{"class":888},[796,3067,3068],{"class":892}," BatchSpanProcessor",[796,3070,1356],{"class":888},[796,3072,3073],{"class":892}," SimpleSpanProcessor",[796,3075,896],{"class":888},[796,3077,899],{"class":884},[796,3079,902],{"class":888},[796,3081,3082],{"class":805},"@opentelemetry\u002Fsdk-trace-base",[796,3084,907],{"class":888},[796,3086,3087,3089,3091,3094,3096,3098,3100,3103],{"class":798,"line":910},[796,3088,885],{"class":884},[796,3090,889],{"class":888},[796,3092,3093],{"class":892}," PostHogTraceExporter",[796,3095,896],{"class":888},[796,3097,899],{"class":884},[796,3099,902],{"class":888},[796,3101,3102],{"class":805},"@posthog\u002Fai\u002Fotel",[796,3104,907],{"class":888},[796,3106,3107,3109,3111,3114,3116,3118,3120,3122,3124,3126],{"class":798,"line":931},[796,3108,885],{"class":884},[796,3110,889],{"class":888},[796,3112,3113],{"class":892}," OTLPHttpProtoTraceExporter",[796,3115,1356],{"class":888},[796,3117,2936],{"class":892},[796,3119,896],{"class":888},[796,3121,899],{"class":884},[796,3123,902],{"class":888},[796,3125,2945],{"class":805},[796,3127,907],{"class":888},[796,3129,3130,3132,3134,3137,3139,3141,3143,3146],{"class":798,"line":938},[796,3131,885],{"class":884},[796,3133,889],{"class":888},[796,3135,3136],{"class":892}," defineInstrumentation",[796,3138,896],{"class":888},[796,3140,899],{"class":884},[796,3142,902],{"class":888},[796,3144,3145],{"class":805},"eve\u002Finstrumentation",[796,3147,907],{"class":888},[796,3149,3150,3152,3154,3157,3159,3161,3163,3165],{"class":798,"line":956},[796,3151,885],{"class":884},[796,3153,889],{"class":888},[796,3155,3156],{"class":892}," evlogRuntimeContext",[796,3158,896],{"class":888},[796,3160,899],{"class":884},[796,3162,902],{"class":888},[796,3164,629],{"class":805},[796,3166,907],{"class":888},[796,3168,3169],{"class":798,"line":992},[796,3170,935],{"emptyLinePlaceholder":934},[796,3172,3173,3175,3177,3179,3181],{"class":798,"line":1008},[796,3174,941],{"class":884},[796,3176,944],{"class":884},[796,3178,3136],{"class":947},[796,3180,950],{"class":892},[796,3182,953],{"class":888},[796,3184,3185],{"class":798,"line":1033},[796,3186,3188],{"class":3187},"sHwdD","  \u002F\u002F One provider, one span processor per backend. Items that generate\n",[796,3190,3191],{"class":798,"line":1066},[796,3192,3193],{"class":3187},"  \u002F\u002F `traceExporter` (Sentry, Datadog, Arize, Jaeger, Braintrust, Honeycomb)\n",[796,3195,3196],{"class":798,"line":1072},[796,3197,3198],{"class":3187},"  \u002F\u002F become an entry in this array. Call registerOTel once, not once per backend.\n",[796,3200,3201,3203,3205,3207,3209,3211,3213,3215,3217],{"class":798,"line":1323},[796,3202,2968],{"class":947},[796,3204,872],{"class":888},[796,3206,2973],{"class":888},[796,3208,2976],{"class":1019},[796,3210,1281],{"class":888},[796,3212,1027],{"class":1026},[796,3214,2936],{"class":947},[796,3216,950],{"class":892},[796,3218,953],{"class":888},[796,3220,3221,3224,3226,3228],{"class":798,"line":1391},[796,3222,3223],{"class":959},"    serviceName",[796,3225,872],{"class":888},[796,3227,2976],{"class":892},[796,3229,1005],{"class":888},[796,3231,3232,3235,3237],{"class":798,"line":1400},[796,3233,3234],{"class":959},"    spanProcessors",[796,3236,872],{"class":888},[796,3238,2034],{"class":892},[796,3240,3241,3244,3246,3248,3251,3253,3255],{"class":798,"line":1405},[796,3242,3243],{"class":888},"      new",[796,3245,3073],{"class":947},[796,3247,950],{"class":892},[796,3249,3250],{"class":888},"new",[796,3252,3093],{"class":947},[796,3254,950],{"class":892},[796,3256,953],{"class":888},[796,3258,3259,3262,3264,3266,3268,3270,3272,3275],{"class":798,"line":1717},[796,3260,3261],{"class":959},"        projectToken",[796,3263,872],{"class":888},[796,3265,1053],{"class":892},[796,3267,1039],{"class":888},[796,3269,1058],{"class":892},[796,3271,1039],{"class":888},[796,3273,3274],{"class":892},"POSTHOG_PROJECT_TOKEN",[796,3276,3277],{"class":888},"!,\n",[796,3279,3280,3283,3286],{"class":798,"line":1767},[796,3281,3282],{"class":888},"      }",[796,3284,3285],{"class":892},"))",[796,3287,1005],{"class":888},[796,3289,3290,3292,3294,3296,3298,3300,3302],{"class":798,"line":1829},[796,3291,3243],{"class":888},[796,3293,3068],{"class":947},[796,3295,950],{"class":892},[796,3297,3250],{"class":888},[796,3299,3113],{"class":947},[796,3301,950],{"class":892},[796,3303,953],{"class":888},[796,3305,3306,3309,3311,3313,3315,3317,3319,3322],{"class":798,"line":1878},[796,3307,3308],{"class":959},"        url",[796,3310,872],{"class":888},[796,3312,1053],{"class":892},[796,3314,1039],{"class":888},[796,3316,1058],{"class":892},[796,3318,1039],{"class":888},[796,3320,3321],{"class":892},"SENTRY_OTLP_TRACES_ENDPOINT",[796,3323,3277],{"class":888},[796,3325,3326,3329,3331,3333,3335,3338,3340,3342,3345,3348,3351,3354,3356,3358,3360,3363,3366],{"class":798,"line":1892},[796,3327,3328],{"class":959},"        headers",[796,3330,872],{"class":888},[796,3332,889],{"class":888},[796,3334,902],{"class":888},[796,3336,3337],{"class":959},"x-sentry-auth",[796,3339,984],{"class":888},[796,3341,872],{"class":888},[796,3343,3344],{"class":888}," `",[796,3346,3347],{"class":805},"sentry sentry_key=",[796,3349,3350],{"class":888},"${",[796,3352,3353],{"class":892},"process",[796,3355,1039],{"class":888},[796,3357,1058],{"class":892},[796,3359,1039],{"class":888},[796,3361,3362],{"class":892},"SENTRY_PUBLIC_KEY",[796,3364,3365],{"class":888},"}`",[796,3367,989],{"class":888},[796,3369,3370,3372,3374],{"class":798,"line":1913},[796,3371,3282],{"class":888},[796,3373,3285],{"class":892},[796,3375,1005],{"class":888},[796,3377,3378,3381],{"class":798,"line":1934},[796,3379,3380],{"class":892},"    ]",[796,3382,1005],{"class":888},[796,3384,3385,3388,3390],{"class":798,"line":1951},[796,3386,3387],{"class":888},"  }",[796,3389,1023],{"class":892},[796,3391,1005],{"class":888},[796,3393,3394,3397,3399],{"class":798,"line":1967},[796,3395,3396],{"class":959},"  events",[796,3398,872],{"class":888},[796,3400,1030],{"class":888},[796,3402,3403,3406,3409,3411,3413,3415,3418,3420,3422],{"class":798,"line":1984},[796,3404,3405],{"class":888},"    '",[796,3407,3408],{"class":959},"step.started",[796,3410,984],{"class":888},[796,3412,872],{"class":888},[796,3414,1016],{"class":888},[796,3416,3417],{"class":1019},"input",[796,3419,1023],{"class":888},[796,3421,1027],{"class":1026},[796,3423,1030],{"class":888},[796,3425,3426,3429,3432,3434,3437,3439,3442,3444,3447,3449,3452,3455],{"class":798,"line":2001},[796,3427,3428],{"class":1026},"      const",[796,3430,3431],{"class":892}," principalId",[796,3433,1050],{"class":888},[796,3435,3436],{"class":892}," input",[796,3438,1039],{"class":888},[796,3440,3441],{"class":892},"session",[796,3443,1039],{"class":888},[796,3445,3446],{"class":892},"auth",[796,3448,1039],{"class":888},[796,3450,3451],{"class":892},"initiator",[796,3453,3454],{"class":888},"?.",[796,3456,3457],{"class":892},"principalId\n",[796,3459,3460,3463,3465,3467,3469,3471,3473,3475,3478,3480],{"class":798,"line":2022},[796,3461,3462],{"class":888},"        ??",[796,3464,3436],{"class":892},[796,3466,1039],{"class":888},[796,3468,3441],{"class":892},[796,3470,1039],{"class":888},[796,3472,3446],{"class":892},[796,3474,1039],{"class":888},[796,3476,3477],{"class":892},"current",[796,3479,3454],{"class":888},[796,3481,3457],{"class":892},[796,3483,3484,3487],{"class":798,"line":2037},[796,3485,3486],{"class":884},"      return",[796,3488,1030],{"class":888},[796,3490,3491,3494,3496],{"class":798,"line":2099},[796,3492,3493],{"class":959},"        runtimeContext",[796,3495,872],{"class":888},[796,3497,1030],{"class":888},[796,3499,3500,3503,3505,3507,3509,3511],{"class":798,"line":2148},[796,3501,3502],{"class":888},"          ...",[796,3504,3053],{"class":947},[796,3506,950],{"class":959},[796,3508,3417],{"class":892},[796,3510,1023],{"class":959},[796,3512,1005],{"class":888},[796,3514,3515],{"class":798,"line":2154},[796,3516,3517],{"class":3187},"          \u002F\u002F Omitted rather than blank: an empty attribute reads as an empty id.\n",[796,3519,3520,3522,3524,3526,3529,3531,3534,3536,3538,3540,3543,3546,3548],{"class":798,"line":2160},[796,3521,3502],{"class":888},[796,3523,950],{"class":959},[796,3525,2646],{"class":892},[796,3527,3528],{"class":888}," ?",[796,3530,889],{"class":888},[796,3532,3533],{"class":959}," posthog_distinct_id",[796,3535,872],{"class":888},[796,3537,3431],{"class":892},[796,3539,896],{"class":888},[796,3541,3542],{"class":888}," :",[796,3544,3545],{"class":888}," {}",[796,3547,1023],{"class":959},[796,3549,1005],{"class":888},[796,3551,3553],{"class":798,"line":3552},32,[796,3554,3555],{"class":888},"        },\n",[796,3557,3559],{"class":798,"line":3558},33,[796,3560,3561],{"class":888},"      }\n",[796,3563,3565],{"class":798,"line":3564},34,[796,3566,3567],{"class":888},"    },\n",[796,3569,3571],{"class":798,"line":3570},35,[796,3572,1069],{"class":888},[796,3574,3576,3578],{"class":798,"line":3575},36,[796,3577,1075],{"class":888},[796,3579,1078],{"class":892},[604,3581,3582,3584,3585,3588,3589,3592],{},[623,3583,3053],{}," returns ",[623,3586,3587],{},"undefined"," outside a tracked turn, and spreading that adds nothing. PostHog is the only registry item that also uses ",[623,3590,3591],{},"events","; the rest only need their span processor. Keep each generated file open while you merge: the env vars and exporter options are the parts worth copying exactly.",[604,3594,3595,3596,3599,3600,3602],{},"Spans and wide events stay joined by attribute, not by trace id: an agent turn has no inbound ",[623,3597,3598],{},"traceparent"," to inherit, so ",[623,3601,2883],{}," is what carries across.",[636,3604,3607,3613,3614,2627,3617,3620,3621,3624,3625,3628,3629,3632,3633,3635],{"color":3605,"icon":3606},"warning","i-lucide-triangle-alert",[614,3608,3609,3610,1039],{},"PostHog drops ",[623,3611,3612],{},"evlog.*"," Its exporter forwards the whole span, but the server-side conversion into ",[623,3615,3616],{},"$ai_generation",[623,3618,3619],{},"$ai_span"," events keeps only attributes prefixed ",[623,3622,3623],{},"posthog_",", and strips that prefix. To join on PostHog, repeat the ids under names that survive, since ",[623,3626,3627],{},"posthog_evlog_request_id"," arrives as ",[623,3630,3631],{},"evlog_request_id",". Other OTLP backends receive ",[623,3634,3612],{}," unchanged.",[604,3637,3638,3639,3642],{},"eve applies the runtime context to the step span only, so the generation spans beneath it inherit nothing. On PostHog that means cost lands on events with no identity and no environment. A span processor that copies the turn's ",[623,3640,3641],{},"posthog_*"," attributes onto every child span is what closes the gap.",[604,3644,3645],{},"To close the loop the other way, send the agent's own wide events to PostHog Logs and point the drain at the same principal:",[786,3647,3649],{"className":875,"code":3648,"filename":871,"language":877,"meta":792,"style":792},"import { createPostHogDrain } from 'evlog\u002Fposthog'\nimport { defineEvlogHook } from 'evlog\u002Feve'\n\nexport default defineEvlogHook({\n  drain: createPostHogDrain({ distinctIdField: 'eve.caller.principalId' }),\n})\n",[623,3650,3651,3671,3689,3693,3705,3735],{"__ignoreMap":792},[796,3652,3653,3655,3657,3660,3662,3664,3666,3669],{"class":798,"line":799},[796,3654,885],{"class":884},[796,3656,889],{"class":888},[796,3658,3659],{"class":892}," createPostHogDrain",[796,3661,896],{"class":888},[796,3663,899],{"class":884},[796,3665,902],{"class":888},[796,3667,3668],{"class":805},"evlog\u002Fposthog",[796,3670,907],{"class":888},[796,3672,3673,3675,3677,3679,3681,3683,3685,3687],{"class":798,"line":910},[796,3674,885],{"class":884},[796,3676,889],{"class":888},[796,3678,893],{"class":892},[796,3680,896],{"class":888},[796,3682,899],{"class":884},[796,3684,902],{"class":888},[796,3686,629],{"class":805},[796,3688,907],{"class":888},[796,3690,3691],{"class":798,"line":931},[796,3692,935],{"emptyLinePlaceholder":934},[796,3694,3695,3697,3699,3701,3703],{"class":798,"line":938},[796,3696,941],{"class":884},[796,3698,944],{"class":884},[796,3700,893],{"class":947},[796,3702,950],{"class":892},[796,3704,953],{"class":888},[796,3706,3707,3709,3711,3713,3715,3717,3720,3722,3724,3727,3729,3731,3733],{"class":798,"line":956},[796,3708,995],{"class":959},[796,3710,872],{"class":888},[796,3712,3659],{"class":947},[796,3714,950],{"class":892},[796,3716,1244],{"class":888},[796,3718,3719],{"class":959}," distinctIdField",[796,3721,872],{"class":888},[796,3723,902],{"class":888},[796,3725,3726],{"class":805},"eve.caller.principalId",[796,3728,984],{"class":888},[796,3730,896],{"class":888},[796,3732,1023],{"class":892},[796,3734,1005],{"class":888},[796,3736,3737,3739],{"class":798,"line":992},[796,3738,1075],{"class":888},[796,3740,1078],{"class":892},[604,3742,3743,3744,1039],{},"Turns then land on the same PostHog person as the LLM traces they produced. See the ",[607,3745,3747],{"href":3746},"\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fposthog#link-a-log-to-a-person-and-a-session-replay","PostHog adapter",[699,3749,3751],{"id":3750},"production","Production",[604,3753,3754],{},"Long-running eve agents should disable terminal pretty-printing and use a non-blocking drain:",[786,3756,3758],{"className":875,"code":3757,"filename":871,"language":877,"meta":792,"style":792},"import { defineEvlogHook } from 'evlog\u002Feve'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\nimport { createDrainPipeline } from 'evlog\u002Fpipeline'\n\nconst drain = createDrainPipeline({ batch: { size: 50, intervalMs: 5000 } })(\n  createAxiomDrain(),\n)\n\nexport default defineEvlogHook({\n  init: {\n    env: { service: 'my-agent', environment: 'production' },\n    pretty: false,\n    sampling: { rates: { info: 10 } },\n  },\n  drain,\n  maxSessions: 256,\n})\n",[623,3759,3760,3778,3796,3816,3820,3869,3878,3882,3886,3898,3906,3940,3953,3981,3985,3991,4003],{"__ignoreMap":792},[796,3761,3762,3764,3766,3768,3770,3772,3774,3776],{"class":798,"line":799},[796,3763,885],{"class":884},[796,3765,889],{"class":888},[796,3767,893],{"class":892},[796,3769,896],{"class":888},[796,3771,899],{"class":884},[796,3773,902],{"class":888},[796,3775,629],{"class":805},[796,3777,907],{"class":888},[796,3779,3780,3782,3784,3786,3788,3790,3792,3794],{"class":798,"line":910},[796,3781,885],{"class":884},[796,3783,889],{"class":888},[796,3785,917],{"class":892},[796,3787,896],{"class":888},[796,3789,899],{"class":884},[796,3791,902],{"class":888},[796,3793,926],{"class":805},[796,3795,907],{"class":888},[796,3797,3798,3800,3802,3805,3807,3809,3811,3814],{"class":798,"line":931},[796,3799,885],{"class":884},[796,3801,889],{"class":888},[796,3803,3804],{"class":892}," createDrainPipeline",[796,3806,896],{"class":888},[796,3808,899],{"class":884},[796,3810,902],{"class":888},[796,3812,3813],{"class":805},"evlog\u002Fpipeline",[796,3815,907],{"class":888},[796,3817,3818],{"class":798,"line":938},[796,3819,935],{"emptyLinePlaceholder":934},[796,3821,3822,3825,3828,3831,3833,3835,3837,3840,3842,3844,3847,3849,3852,3854,3857,3859,3862,3864,3866],{"class":798,"line":956},[796,3823,3824],{"class":1026},"const",[796,3826,3827],{"class":892}," drain ",[796,3829,3830],{"class":888},"=",[796,3832,3804],{"class":947},[796,3834,950],{"class":892},[796,3836,1244],{"class":888},[796,3838,3839],{"class":959}," batch",[796,3841,872],{"class":888},[796,3843,889],{"class":888},[796,3845,3846],{"class":959}," size",[796,3848,872],{"class":888},[796,3850,3851],{"class":1548}," 50",[796,3853,1356],{"class":888},[796,3855,3856],{"class":959}," intervalMs",[796,3858,872],{"class":888},[796,3860,3861],{"class":1548}," 5000",[796,3863,896],{"class":888},[796,3865,896],{"class":888},[796,3867,3868],{"class":892},")(\n",[796,3870,3871,3874,3876],{"class":798,"line":992},[796,3872,3873],{"class":947},"  createAxiomDrain",[796,3875,1002],{"class":892},[796,3877,1005],{"class":888},[796,3879,3880],{"class":798,"line":1008},[796,3881,1078],{"class":892},[796,3883,3884],{"class":798,"line":1033},[796,3885,935],{"emptyLinePlaceholder":934},[796,3887,3888,3890,3892,3894,3896],{"class":798,"line":1066},[796,3889,941],{"class":884},[796,3891,944],{"class":884},[796,3893,893],{"class":947},[796,3895,950],{"class":892},[796,3897,953],{"class":888},[796,3899,3900,3902,3904],{"class":798,"line":1072},[796,3901,960],{"class":959},[796,3903,872],{"class":888},[796,3905,1030],{"class":888},[796,3907,3908,3911,3913,3915,3917,3919,3921,3923,3925,3927,3930,3932,3934,3936,3938],{"class":798,"line":1323},[796,3909,3910],{"class":959},"    env",[796,3912,872],{"class":888},[796,3914,889],{"class":888},[796,3916,974],{"class":959},[796,3918,872],{"class":888},[796,3920,902],{"class":888},[796,3922,981],{"class":805},[796,3924,984],{"class":888},[796,3926,1356],{"class":888},[796,3928,3929],{"class":959}," environment",[796,3931,872],{"class":888},[796,3933,902],{"class":888},[796,3935,3750],{"class":805},[796,3937,984],{"class":888},[796,3939,989],{"class":888},[796,3941,3942,3945,3947,3951],{"class":798,"line":1391},[796,3943,3944],{"class":959},"    pretty",[796,3946,872],{"class":888},[796,3948,3950],{"class":3949},"sfNiH"," false",[796,3952,1005],{"class":888},[796,3954,3955,3958,3960,3962,3965,3967,3969,3972,3974,3977,3979],{"class":798,"line":1400},[796,3956,3957],{"class":959},"    sampling",[796,3959,872],{"class":888},[796,3961,889],{"class":888},[796,3963,3964],{"class":959}," rates",[796,3966,872],{"class":888},[796,3968,889],{"class":888},[796,3970,3971],{"class":959}," info",[796,3973,872],{"class":888},[796,3975,3976],{"class":1548}," 10",[796,3978,896],{"class":888},[796,3980,989],{"class":888},[796,3982,3983],{"class":798,"line":1405},[796,3984,1069],{"class":888},[796,3986,3987,3989],{"class":798,"line":1717},[796,3988,995],{"class":892},[796,3990,1005],{"class":888},[796,3992,3993,3996,3998,4001],{"class":798,"line":1767},[796,3994,3995],{"class":959},"  maxSessions",[796,3997,872],{"class":888},[796,3999,4000],{"class":1548}," 256",[796,4002,1005],{"class":888},[796,4004,4005,4007],{"class":798,"line":1829},[796,4006,1075],{"class":888},[796,4008,1078],{"class":892},[704,4010,4011,4021],{},[707,4012,4013],{},[710,4014,4015,4018],{},[713,4016,4017],{},"Concern",[713,4019,4020],{},"Recommendation",[720,4022,4023,4034,4042,4053,4067],{},[710,4024,4025,4028],{},[725,4026,4027],{},"Terminal output",[725,4029,4030,4033],{},[623,4031,4032],{},"init.pretty: false"," — pretty-print is for local dev only",[710,4035,4036,4039],{},[725,4037,4038],{},"Drain latency",[725,4040,4041],{},"Batch or async HTTP drains; never block the turn on I\u002FO",[710,4043,4044,4047],{},[725,4045,4046],{},"Head sampling",[725,4048,4049,4052],{},[623,4050,4051],{},"init.sampling.rates"," — eve emits one event per turn, not per token",[710,4054,4055,4057],{},[725,4056,226],{},[725,4058,4059,4062,4063,4066],{},[623,4060,4061],{},"maxSessions"," (default ",[623,4064,4065],{},"256",") evicts oldest idle session state",[710,4068,4069,4072],{},[725,4070,4071],{},"Load",[725,4073,4074],{},"Hook handlers are O(1) per stream event; cost is dominated by your drain",[699,4076,346],{"id":4077},"options",[704,4079,4080,4090],{},[707,4081,4082],{},[710,4083,4084,4087],{},[713,4085,4086],{},"Option",[713,4088,4089],{},"Description",[720,4091,4092,4105,4126,4146,4162,4175,4196,4207],{},[710,4093,4094,4098],{},[725,4095,4096],{},[623,4097,94],{},[725,4099,4100,4101,4104],{},"Passed to ",[623,4102,4103],{},"initLogger()"," on first hook invocation",[710,4106,4107,4121],{},[725,4108,4109,2627,4112,2627,4115,2627,4118],{},[623,4110,4111],{},"drain",[623,4113,4114],{},"enrich",[623,4116,4117],{},"keep",[623,4119,4120],{},"plugins",[725,4122,4123,4124,1023],{},"Same as HTTP integrations (",[607,4125,4120],{"href":509},[710,4127,4128,4132],{},[725,4129,4130],{},[623,4131,2776],{},[725,4133,4134,4137,4138,4141,4142,4145],{},[623,4135,4136],{},"'omit'"," (default), ",[623,4139,4140],{},"'preview'"," or ",[623,4143,4144],{},"'full'"," — how much of the user message and the agent response to record",[710,4147,4148,4153],{},[725,4149,4150],{},[623,4151,4152],{},"messagePreviewLength",[725,4154,4155,4156,4158,4159,1023],{},"Characters kept in ",[623,4157,4140],{}," mode (default ",[623,4160,4161],{},"500",[710,4163,4164,4169],{},[725,4165,4166],{},[623,4167,4168],{},"sessionEvent",[725,4170,4171,4174],{},[623,4172,4173],{},"true"," emits one extra event per session, rolling up its turns",[710,4176,4177,4183],{},[725,4178,4179,2627,4181],{},[623,4180,2794],{},[623,4182,1897],{},[725,4184,4185,4186,1447,4189,4192,4193,4195],{},"Fallback token pricing (",[623,4187,4188],{},"ModelCost",[623,4190,4191],{},"evlog\u002Fai",") → ",[623,4194,2790],{},", used only when eve reports no cost",[710,4197,4198,4202],{},[725,4199,4200],{},[623,4201,4061],{},[725,4203,4204,4205,1023],{},"In-memory session cap for context carry-over (default ",[623,4206,4065],{},[710,4208,4209,4217],{},[725,4210,4211,2627,4214],{},[623,4212,4213],{},"include",[623,4215,4216],{},"exclude",[725,4218,4219,4220,1023],{},"Route-style filters on turn paths (",[623,4221,4222],{},"\u002Fsessions\u002F*\u002Fturns\u002F*",[699,4224,516],{"id":4225},"tail-sampling",[604,4227,4228,4229,4231],{},"Use ",[623,4230,4117],{}," to force-keep turns with failed tools or high token usage:",[786,4233,4235],{"className":875,"code":4234,"filename":871,"language":877,"meta":792,"style":792},"export default defineEvlogHook({\n  drain: createAxiomDrain(),\n  keep: (ctx) => {\n    const ai = ctx.context.ai as {\n      inputTokens?: number\n      outputTokens?: number\n      tools?: Array\u003C{ success: boolean }>\n    } | undefined\n    const totalTokens = (ai?.inputTokens ?? 0) + (ai?.outputTokens ?? 0)\n    if (totalTokens > 10_000) ctx.shouldKeep = true\n    if (ai?.tools?.some(t => !t.success)) ctx.shouldKeep = true\n  },\n})\n",[623,4236,4237,4249,4261,4278,4304,4315,4324,4348,4359,4401,4431,4477,4481],{"__ignoreMap":792},[796,4238,4239,4241,4243,4245,4247],{"class":798,"line":799},[796,4240,941],{"class":884},[796,4242,944],{"class":884},[796,4244,893],{"class":947},[796,4246,950],{"class":892},[796,4248,953],{"class":888},[796,4250,4251,4253,4255,4257,4259],{"class":798,"line":910},[796,4252,995],{"class":959},[796,4254,872],{"class":888},[796,4256,917],{"class":947},[796,4258,1002],{"class":892},[796,4260,1005],{"class":888},[796,4262,4263,4266,4268,4270,4272,4274,4276],{"class":798,"line":931},[796,4264,4265],{"class":947},"  keep",[796,4267,872],{"class":888},[796,4269,1016],{"class":888},[796,4271,1020],{"class":1019},[796,4273,1023],{"class":888},[796,4275,1027],{"class":1026},[796,4277,1030],{"class":888},[796,4279,4280,4282,4285,4287,4290,4292,4295,4297,4299,4302],{"class":798,"line":938},[796,4281,1288],{"class":1026},[796,4283,4284],{"class":892}," ai",[796,4286,1050],{"class":888},[796,4288,4289],{"class":892}," ctx",[796,4291,1039],{"class":888},[796,4293,4294],{"class":892},"context",[796,4296,1039],{"class":888},[796,4298,1883],{"class":892},[796,4300,4301],{"class":884}," as",[796,4303,1030],{"class":888},[796,4305,4306,4309,4312],{"class":798,"line":956},[796,4307,4308],{"class":959},"      inputTokens",[796,4310,4311],{"class":888},"?:",[796,4313,4314],{"class":802}," number\n",[796,4316,4317,4320,4322],{"class":798,"line":992},[796,4318,4319],{"class":959},"      outputTokens",[796,4321,4311],{"class":888},[796,4323,4314],{"class":802},[796,4325,4326,4329,4331,4334,4337,4340,4342,4345],{"class":798,"line":1008},[796,4327,4328],{"class":959},"      tools",[796,4330,4311],{"class":888},[796,4332,4333],{"class":802}," Array",[796,4335,4336],{"class":888},"\u003C{",[796,4338,4339],{"class":959}," success",[796,4341,872],{"class":888},[796,4343,4344],{"class":802}," boolean",[796,4346,4347],{"class":888}," }>\n",[796,4349,4350,4353,4356],{"class":798,"line":1033},[796,4351,4352],{"class":888},"    }",[796,4354,4355],{"class":888}," |",[796,4357,4358],{"class":802}," undefined\n",[796,4360,4361,4363,4366,4368,4370,4372,4374,4376,4379,4381,4384,4387,4389,4391,4393,4395,4397,4399],{"class":798,"line":1066},[796,4362,1288],{"class":1026},[796,4364,4365],{"class":892}," totalTokens",[796,4367,1050],{"class":888},[796,4369,1016],{"class":959},[796,4371,1883],{"class":892},[796,4373,3454],{"class":888},[796,4375,1972],{"class":892},[796,4377,4378],{"class":888}," ??",[796,4380,1674],{"class":1548},[796,4382,4383],{"class":959},") ",[796,4385,4386],{"class":888},"+",[796,4388,1016],{"class":959},[796,4390,1883],{"class":892},[796,4392,3454],{"class":888},[796,4394,1989],{"class":892},[796,4396,4378],{"class":888},[796,4398,1674],{"class":1548},[796,4400,1078],{"class":959},[796,4402,4403,4406,4408,4411,4414,4417,4419,4421,4423,4426,4428],{"class":798,"line":1072},[796,4404,4405],{"class":884},"    if",[796,4407,1016],{"class":959},[796,4409,4410],{"class":892},"totalTokens",[796,4412,4413],{"class":888}," >",[796,4415,4416],{"class":1548}," 10_000",[796,4418,4383],{"class":959},[796,4420,1020],{"class":892},[796,4422,1039],{"class":888},[796,4424,4425],{"class":892},"shouldKeep",[796,4427,1050],{"class":888},[796,4429,4430],{"class":3949}," true\n",[796,4432,4433,4435,4437,4439,4441,4443,4445,4448,4450,4453,4455,4458,4460,4462,4464,4467,4469,4471,4473,4475],{"class":798,"line":1323},[796,4434,4405],{"class":884},[796,4436,1016],{"class":959},[796,4438,1883],{"class":892},[796,4440,3454],{"class":888},[796,4442,2027],{"class":892},[796,4444,3454],{"class":888},[796,4446,4447],{"class":947},"some",[796,4449,950],{"class":959},[796,4451,4452],{"class":1019},"t",[796,4454,1027],{"class":1026},[796,4456,4457],{"class":888}," !",[796,4459,4452],{"class":892},[796,4461,1039],{"class":888},[796,4463,2076],{"class":892},[796,4465,4466],{"class":959},")) ",[796,4468,1020],{"class":892},[796,4470,1039],{"class":888},[796,4472,4425],{"class":892},[796,4474,1050],{"class":888},[796,4476,4430],{"class":3949},[796,4478,4479],{"class":798,"line":1391},[796,4480,1069],{"class":888},[796,4482,4483,4485],{"class":798,"line":1400},[796,4484,1075],{"class":888},[796,4486,1078],{"class":892},[699,4488,4490],{"id":4489},"audit-logs","Audit logs",[604,4492,4493,4494,4496,4497,4500,4501,4504,4505,4508,4509,1443,4511,1039],{},"Combine with ",[607,4495,387],{"href":393},": register ",[623,4498,4499],{},"auditEnricher()"," via ",[623,4502,4503],{},"init.plugins"," or a global plugin, and call ",[623,4506,4507],{},"log.audit()"," inside tools when a human approval gate fires. Tool rejections surface on ",[623,4510,2562],{},[623,4512,4513],{},"status: \"rejected\"",[699,4515,4517],{"id":4516},"run-locally","Run locally",[786,4519,4521],{"className":788,"code":4520,"language":791,"meta":792,"style":792},"git clone https:\u002F\u002Fgithub.com\u002Fevloghq\u002Fevlog\ncd evlog\npnpm install\npnpm example eve\n",[623,4522,4523,4534,4542,4549],{"__ignoreMap":792},[796,4524,4525,4528,4531],{"class":798,"line":799},[796,4526,4527],{"class":802},"git",[796,4529,4530],{"class":805}," clone",[796,4532,4533],{"class":805}," https:\u002F\u002Fgithub.com\u002Fevloghq\u002Fevlog\n",[796,4535,4536,4539],{"class":798,"line":910},[796,4537,4538],{"class":947},"cd",[796,4540,4541],{"class":805}," evlog\n",[796,4543,4544,4546],{"class":798,"line":931},[796,4545,790],{"class":802},[796,4547,4548],{"class":805}," install\n",[796,4550,4551,4553,4556],{"class":798,"line":938},[796,4552,790],{"class":802},[796,4554,4555],{"class":805}," example",[796,4557,812],{"class":805},[604,4559,4560,4561,4564,4565,4568,4569,4572,4573,4579],{},"The ",[623,4562,4563],{},"examples\u002Feve"," project is a ",[614,4566,4567],{},"support refund copilot"," (Clearbill SaaS): lookup customer → lookup order → issue refund, with eve approvals when amount > $100. Run ",[623,4570,4571],{},"pnpm example eve",", open ",[614,4574,4575],{},[607,4576,4577],{"href":4577,"rel":4578},"http:\u002F\u002Flocalhost:3000",[611],", and click a starter prompt.",[699,4581,4583],{"id":4582},"what-to-read-next","What to read next",[662,4585,4586,4594,4602,4608],{},[665,4587,4588,4593],{},[607,4589,4592],{"href":4590,"rel":4591},"https:\u002F\u002Feve.dev\u002Fdocs\u002Fguides\u002Fhooks",[611],"eve hooks guide",": stream event vocabulary",[665,4595,4596,4601],{},[607,4597,4600],{"href":4598,"rel":4599},"https:\u002F\u002Feve.dev\u002Fdocs\u002Fguides\u002Finstrumentation",[611],"eve instrumentation",": OTel spans (complementary)",[665,4603,4604,4607],{},[607,4605,4606],{"href":338},"AI SDK use case",": when you own the model loop directly",[665,4609,4610,4613],{},[607,4611,4612],{"href":153},"Adapters overview",": drain destinations",[4615,4616,4617],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":792,"searchDepth":910,"depth":910,"links":4619},[4620,4621,4627,4630,4633,4634,4635,4636,4637,4638],{"id":701,"depth":910,"text":702},{"id":776,"depth":910,"text":25,"children":4622},[4623,4624,4625,4626],{"id":780,"depth":931,"text":781},{"id":864,"depth":931,"text":865},{"id":1092,"depth":931,"text":1093},{"id":1435,"depth":931,"text":1436},{"id":1476,"depth":910,"text":1477,"children":4628},[4629],{"id":2595,"depth":931,"text":2596},{"id":2832,"depth":910,"text":2833,"children":4631},[4632],{"id":3027,"depth":931,"text":3028},{"id":3750,"depth":910,"text":3751},{"id":4077,"depth":910,"text":346},{"id":4225,"depth":910,"text":516},{"id":4489,"depth":910,"text":4490},{"id":4516,"depth":910,"text":4517},{"id":4582,"depth":910,"text":4583},"One evlog wide event per eve agent turn: token usage, tool executions, and business context, through your own drains and tail sampling.","md",[4642],{"label":4643,"icon":4644,"to":1125,"color":1412,"variant":4645},"Source Code","i-simple-icons-github","subtle",{},{"title":445,"icon":448},{"title":445,"description":4639},"xIc37yECFoQZTjrjZKJ9N3HStP7lPkTn3ia9b6WEtuw",[4651,4653],{"title":440,"path":441,"stem":442,"description":4652,"icon":443,"children":-1},"Add derived context to every wide event, from user agent and geo to your own computed fields.",{"title":450,"path":451,"stem":452,"description":4654,"icon":434,"children":-1},"Build a Node.js HTTP handler with structured request logs, explicit outcomes, error context, and a JSON event you can query.",1789076906371]