Skip to content

feat(flags-core): add metrics environment option - #453

Draft
luismeyer wants to merge 3 commits into
mainfrom
sdk-key-environment
Draft

feat(flags-core): add metrics environment option#453
luismeyer wants to merge 3 commits into
mainfrom
sdk-key-environment

Conversation

@luismeyer

@luismeyer luismeyer commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • add a public metricEnvironment client option that labels evaluation metrics sent to /v1/ingest through the existing X-Vercel-Env header
  • keep datafile, polling, and streaming requests unchanged so the option cannot alter flag evaluation environment selection
  • preserve VERCEL_ENV as the ingestion-header fallback when metricEnvironment is unset, with focused public API coverage and a minor changeset

Validation

  • pnpm check (from packages/vercel-flags-core; passes with one pre-existing Biome warning in src/index.make.test.ts)
  • pnpm type-check (from packages/vercel-flags-core)
  • pnpm build (from packages/vercel-flags-core)
  • pnpm test (from packages/vercel-flags-core; 491 tests)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>

Co-Authored-By: Luis Meyer <luis.meyer@vercel.com>
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
flags-playground Ready Ready Preview, Comment, Open in v0 Jul 29, 2026 11:07am
flags-sdk-dev Ready Ready Preview, Comment, Open in v0 Jul 29, 2026 11:07am
flags-sdk-snippets Ready Ready Preview, Comment, Open in v0 Jul 29, 2026 11:07am
flags-sdk-sveltekit-snippets Ready Ready Preview, Comment, Open in v0 Jul 29, 2026 11:07am
shirt-shop Ready Ready Preview, Comment, Open in v0 Jul 29, 2026 11:07am
shirt-shop-api Ready Ready Preview, Comment, Open in v0 Jul 29, 2026 11:07am

Co-Authored-By: Claude <noreply@anthropic.com>

Co-Authored-By: Luis Meyer <luis.meyer@vercel.com>
Comment thread packages/vercel-flags-core/src/utils/ingest.ts Outdated
Comment thread packages/vercel-flags-core/src/controller/normalized-options.ts
Co-Authored-By: Claude <noreply@anthropic.com>
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