Skip to content

feat: add standalone browser-to-server log transport#77

Merged
HugoRCD merged 5 commits intomainfrom
EVL-74
Feb 14, 2026
Merged

feat: add standalone browser-to-server log transport#77
HugoRCD merged 5 commits intomainfrom
EVL-74

Conversation

@HugoRCD
Copy link
Copy Markdown
Owner

@HugoRCD HugoRCD commented Feb 14, 2026

This pull request introduces first-class support for browser log ingestion with a new framework-agnostic "browser drain" for client-side logging. It adds comprehensive documentation, playground integration, and a complete example app, making it easy to send structured browser logs to any HTTP endpoint using fetch or sendBeacon. The changes include new APIs, documentation, playground tests, and a runnable demo.

@HugoRCD HugoRCD self-assigned this Feb 14, 2026
@HugoRCD HugoRCD requested a review from Copilot February 14, 2026 15:10
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 14, 2026

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

Project Deployment Actions Updated (UTC)
evlog-docs Ready Ready Preview, Comment, Open in v0 Feb 14, 2026 3:28pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 14, 2026

Thank you for following the naming conventions! 🙏

Copy link
Copy Markdown
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 first-class browser-to-server log transport support to evlog with a new framework-agnostic "browser drain" module. The implementation provides both high-level and low-level APIs for sending structured browser logs to HTTP endpoints using fetch or sendBeacon, with built-in batching, retry logic, and automatic flushing on page visibility changes.

Changes:

  • Added evlog/browser module with createBrowserDrain and createBrowserLogDrain functions for client-side logging
  • Comprehensive test suite covering fetch, sendBeacon, timeouts, batching, and pipeline integration
  • Complete documentation with examples for Express and Hono server endpoints
  • Fully functional browser example app demonstrating the end-to-end flow
  • Playground integration with three test scenarios (quick setup, batch events, sendBeacon)

Reviewed changes

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

Show a summary per file
File Description
packages/evlog/src/browser.ts Core implementation of browser drain with fetch/sendBeacon transport
packages/evlog/test/browser.test.ts Comprehensive test coverage for both drain functions
packages/evlog/tsdown.config.ts Added browser module to build configuration
packages/evlog/package.json Exported browser module with TypeScript definitions
examples/browser/src/client.ts Demo client showing log.info/log.error usage with browser drain
examples/browser/src/server.ts Hono server with ingest endpoint and demo UI
examples/browser/package.json Example dependencies (Hono, esbuild, tsx)
examples/browser/tsconfig.json TypeScript configuration for the example
examples/browser/README.md Setup and usage instructions for the example
apps/playground/app/pages/index.vue Playground integration with three browser drain test handlers
apps/playground/app/config/tests.config.ts Test configuration for browser drain section
apps/playground/server/api/test/browser-ingest.post.ts API endpoint for playground testing
apps/docs/content/3.adapters/9.browser.md Comprehensive documentation for the browser drain
apps/docs/content/3.adapters/1.overview.md Added browser drain to adapters overview
bun.lock Lockfile updates for new example workspace

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

Comment thread examples/browser/README.md
Comment thread packages/evlog/src/browser.ts
Comment thread examples/browser/package.json
Comment thread apps/playground/app/pages/index.vue
Comment thread apps/playground/app/config/tests.config.ts Outdated
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 14, 2026

npm i https://pkg.pr.new/evlog@77

commit: 84d9356

@HugoRCD HugoRCD merged commit 8656047 into main Feb 14, 2026
12 checks passed
@HugoRCD HugoRCD deleted the EVL-74 branch February 14, 2026 15:30
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.

2 participants