Skip to content

feat: track accept header dimension#1

Merged
mezotv merged 2 commits into
mainfrom
cursor/import-upstash-prs-6850
Jun 5, 2026
Merged

feat: track accept header dimension#1
mezotv merged 2 commits into
mainfrom
cursor/import-upstash-prs-6850

Conversation

@mezotv

@mezotv mezotv commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

Notes

  • Resolved conflicts against current main, which already drops unknown-agent requests.

Testing

  • bun run typecheck
  • bun test src/duration.test.ts src/time.test.ts src/hash.test.ts src/request.test.ts
  • bun test (fails because UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN are not configured in this environment; non-Redis tests, including the new request tests, pass)
Open in Web Open in Cursor 

Summary by cubic

Switches analytics in the Next.js proxy to after() so tracking never blocks responses, and adds accept header tracking as a new dimension across ingestion and schema.

  • New Features

    • Capture and store normalized Accept header as accept in events and the index schema.
  • Migration

    • In proxy.ts, replace await analytics.track(request) with after(() => analytics.track(request)) from next/server.

Written for commit e604040. Summary will update on new commits.

Review in cubic

mezotv and others added 2 commits June 5, 2026 11:45
Uses after for the analytics tracking as recommended by Next.js https://nextjs.org/docs/app/api-reference/functions/after
Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor cursor Bot changed the title Import upstream analytics PRs feat: track accept header dimension Jun 5, 2026
@mezotv mezotv marked this pull request as ready for review June 5, 2026 11:51

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 6 files

Re-trigger cubic

@mezotv mezotv merged commit 1d45ddd into main Jun 5, 2026
2 checks passed
@mezotv mezotv deleted the cursor/import-upstash-prs-6850 branch June 5, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant