Skip to content

Commit 7bf4166

Browse files
fix(e2e): set DEPLOY_TAG so bulletin-deploy spans are tagged as E2E traffic (#128)
The E2E runner already set DOT_TAG for playground-CLI's own Sentry telemetry but never set DEPLOY_TAG, so bulletin-deploy's deploy-pipeline spans landed in production telemetry untagged. Use an e2e-cli-* prefix to distinguish playground-CLI E2E from bulletin-deploy's own E2E suite (which uses bare e2e-* tags). Respects any explicit DEPLOY_TAG override (e.g. the post-release workflow's e2e-ci-post-release).
1 parent b680096 commit 7bf4166

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ These are things that aren't self-evident from reading the code and have bitten
4949
- `2216067.json`**Playground CLI Failures** (per-error-type drill-downs).
5050
- `2216096.json`**Playground CLI E2E Health** (inverse filter, `cli.tag:e2e-*`).
5151
- **Workflow:** run `./sentry/backup-dashboards.sh` BEFORE any change. Use `./sentry/patch-dashboard.py <id> <patch.json>` for surgical edits (supports `replace`, `patch_query`, `set_description` ops) or full widget replacement. Use `./sentry/create-dashboard.py <payload.json>` for new dashboards. Per spec §15f, do NOT include a `projects` field in POST payloads. Per spec §15g, PUT replaces the whole widget list — backup first.
52-
- **E2E tagging:** every spawn from `e2e/cli/helpers/dot.ts` injects `DOT_TAG=e2e-local` (fallback) and `DOT_TELEMETRY=1`. `tools/e2e-local.sh` overrides that to `e2e-local-{smoke|pr|nightly}` based on the mode argument. CI sets `DOT_TAG=e2e-ci-{pr|nightly|dispatch}` in `.github/workflows/e2e.yml` so production health widgets filter cleanly via `!cli.tag:e2e-*`.
52+
- **E2E tagging:** every spawn from `e2e/cli/helpers/dot.ts` injects `DOT_TAG=e2e-local` (fallback), `DOT_TELEMETRY=1`, and `DEPLOY_TAG=e2e-cli-local` (derived from `DOT_TAG` with an `e2e-cli-` prefix). `tools/e2e-local.sh` overrides `DOT_TAG` to `e2e-local-{smoke|pr|nightly}`, which makes `DEPLOY_TAG` become `e2e-cli-local-{smoke|pr|nightly}`. CI sets `DOT_TAG=e2e-ci-{pr|nightly|dispatch}`, making `DEPLOY_TAG=e2e-cli-ci-{pr|nightly|dispatch}`. The `e2e-cli-` prefix on `DEPLOY_TAG` distinguishes playground-CLI E2E traffic from bulletin-deploy's own E2E suite (which uses bare `e2e-*` tags) in bulletin-deploy's telemetry dashboards. Production health widgets filter cleanly via `!cli.tag:e2e-*` (playground-CLI's Sentry) and `!deploy.tag:e2e-*` (bulletin-deploy's Sentry).
5353
- **SAD% propagation** is verified by a regression test in `src/telemetry.test.ts` ("SAD% propagation through transaction envelope"). It confirms `captureWarning` flips `cli.sad="true"` on the root transaction. If that test fails, the SAD% dashboard widget on Dashboard 1 will silently degrade to a duplicate of the unexpected-failure rate.
5454

5555
## E2E Tests

e2e/cli/helpers/dot.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,15 @@ export async function dotWithSuri(
6666
// ── Internal ────────────────────────────────────────────────────────────────
6767

6868
async function run(args: string[], options?: DotOptions): Promise<DotResult> {
69+
const dotTag = process.env.DOT_TAG ?? "e2e-local";
6970
const env: Record<string, string> = {
70-
DOT_TAG: process.env.DOT_TAG ?? "e2e-local",
71+
DOT_TAG: dotTag,
72+
// Forward a bulletin-deploy telemetry tag so deploy-pipeline spans are
73+
// tagged as playground-CLI E2E traffic (e2e-cli-*) rather than real-user
74+
// traffic. The e2e-cli- prefix distinguishes us from bulletin-deploy's own
75+
// E2E suite, which uses bare e2e-* tags. Respect any explicit DEPLOY_TAG
76+
// override (e.g. e2e-ci-post-release set by the post-release workflow).
77+
DEPLOY_TAG: process.env.DEPLOY_TAG ?? "e2e-cli-" + dotTag.replace(/^e2e-/, ""),
7178
DOT_TELEMETRY: process.env.DOT_TELEMETRY ?? "1",
7279
...options?.env,
7380
};

0 commit comments

Comments
 (0)