Skip to content

Conversation

@HugoRCD
Copy link
Owner

@HugoRCD HugoRCD commented Feb 7, 2026

This pull request introduces first-class support for PostHog as a log drain adapter in the evlog observability framework. It adds the PostHog adapter implementation, documentation, and integration points throughout the codebase and docs. This enables users to send server-side logs and wide events to PostHog for product analytics, session replay correlation, and advanced querying.

@HugoRCD HugoRCD self-assigned this Feb 7, 2026
@HugoRCD HugoRCD requested a review from Copilot February 7, 2026 17:38
@vercel
Copy link

vercel bot commented Feb 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evlog-docs Ready Ready Preview, Comment Feb 7, 2026 5:47pm

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Thank you for following the naming conventions! 🙏

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new PostHog log drain adapter to evlog, along with supporting package exports, tests, and documentation so users can route wide events into PostHog via the evlog:drain hook.

Changes:

  • Added a PostHog adapter (createPostHogDrain, sendToPostHog, sendBatchToPostHog, toPostHogEvent) with runtime/env configuration support.
  • Exposed the adapter as evlog/posthog via build + package export wiring, and added a comprehensive Vitest suite.
  • Extended docs and the playground app to include PostHog adapter guidance and a drain test endpoint/UI entry.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/evlog/test/adapters/posthog.test.ts Adds unit tests for PostHog event mapping and HTTP batching/timeout behavior.
packages/evlog/src/adapters/posthog.ts Implements the PostHog drain adapter and PostHog Batch API sender.
packages/evlog/package.json Exposes evlog/posthog via exports and typesVersions.
packages/evlog/build.config.ts Adds the PostHog adapter entrypoint to the build outputs.
apps/playground/server/plugins/evlog-drain.ts Adds commented example wiring for the PostHog drain in the playground.
apps/playground/server/api/test/drain.get.ts Adds an endpoint to emit a wide event intended to exercise drain adapters.
apps/playground/app/config/tests.config.ts Adds a “Drains” test card to trigger the new drain test endpoint.
apps/docs/content/3.adapters/5.custom.md Links the new PostHog adapter from the custom adapters page.
apps/docs/content/3.adapters/4.posthog.md New documentation page describing installation/configuration/usage for PostHog.
apps/docs/content/3.adapters/3.otlp.md Adds “Next steps” link to the PostHog adapter docs.
apps/docs/content/3.adapters/2.axiom.md Adds “Next steps” link to the PostHog adapter docs.
apps/docs/content/3.adapters/1.overview.md Adds PostHog to the adapters overview page and env var examples.
AGENTS.md Documents the new adapter entrypoint and minimal setup instructions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

HugoRCD and others added 2 commits February 7, 2026 18:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@HugoRCD HugoRCD merged commit 1233b7c into main Feb 7, 2026
9 of 10 checks passed
@HugoRCD HugoRCD deleted the EVL-46 branch February 7, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant