Skip to content

feat(webapp): add org slug and project name to deployment telemetry events - #4785

Merged
myftija merged 1 commit into
mainfrom
feature/deployment-telemetry-org-slug
Aug 26, 2026
Merged

feat(webapp): add org slug and project name to deployment telemetry events#4785
myftija merged 1 commit into
mainfrom
feature/deployment-telemetry-org-slug

Conversation

@myftija

@myftija myftija commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Adds $trigger.org.slug and $trigger.project.name attributes to the deployment.finished / deployment.initialized events (follow-up to #4778).

…vents

Dashboards grouped by org id / project ref require a lookup to know who
is deploying; the events now also carry $trigger.org.slug and
$trigger.project.name, sourced from data the emission sites already
hold (the timeout and cancel paths gain one select field each).
@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dc8fa01

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 09cb6582-aaaa-4fa6-8c81-339723a6867b

📥 Commits

Reviewing files that changed from the base of the PR and between 38e78f8 and dc8fa01.

📒 Files selected for processing (8)
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (30)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (22, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
  • GitHub Check: obsmap / 🧪 Unit Tests: Observability Map
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (10)
New code must target Run Engine V2 through the singleton in `app/v3/runEngine.server.ts`; do not reintroduce V1 execution paths. V1 branches may only reject or finalize gracefully with a clean 4xx.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
Never use `request.signal` to detect client disconnects. Use `getRequestAbortSignal()` from `app/services/httpAsyncStorage.server.ts`, which is wired to Express response close events.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
For dashboard changes, visually verify the running Remix app with Chrome DevTools MCP, using snapshots, screenshots, interaction, and console-message checks as appropriate.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
**Prefer static imports over dynamic imports.** Only use dynamic `import()` when:

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
Add crumbs as you write code — not just when debugging. Mark lines with

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
Use zod for validation in packages/core and apps/webapp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
Access environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env`

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
Use function declarations instead of default exports

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
Use types over interfaces for TypeScript

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

Files:

  • apps/webapp/app/v3/services/recordDeploymentFinished.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/v3/services/failDeployment.server.ts
  • apps/webapp/app/v3/deploymentTelemetry.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/v3/services/timeoutDeployment.server.ts
  • apps/webapp/app/v3/services/deployment.server.ts
  • apps/webapp/app/v3/services/finalizeDeployment.server.ts
🔇 Additional comments (8)
apps/webapp/app/v3/deploymentTelemetry.ts (1)

18-20: LGTM!

apps/webapp/app/v3/services/recordDeploymentFinished.server.ts (1)

40-42: LGTM!

Also applies to: 78-80, 154-156

apps/webapp/app/v3/services/deployment.server.ts (1)

259-261: LGTM!

Also applies to: 524-531

apps/webapp/app/v3/services/initializeDeployment.server.ts (1)

402-404: LGTM!

apps/webapp/app/v3/services/failDeployment.server.ts (1)

86-88: LGTM!

apps/webapp/app/v3/services/finalizeDeployment.server.ts (1)

109-111: LGTM!

apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts (1)

343-345: LGTM!

apps/webapp/app/v3/services/timeoutDeployment.server.ts (1)

20-22: LGTM!

Also applies to: 82-84


Walkthrough

Deployment telemetry now includes organization slugs and project names. The telemetry attribute map and EnvironmentInfo type define these fields. Deployment initialization, completion, failure, cancellation, and timeout paths populate the fields. Deployment queries select the required organization and project values. deployment.finished and deployment.initialized spans record both attributes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description accurately summarizes the telemetry change, but it omits most required template sections, including the issue reference, checklist, testing steps, changelog, and screenshots. Complete the required description template. Add the issue reference, checklist, testing steps, changelog entry, and screenshots section, or state that screenshots are not applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 8 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding organization slug and project name to deployment telemetry events.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/deployment-telemetry-org-slug

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@myftija
myftija merged commit 8da393b into main Aug 26, 2026
53 checks passed
@myftija
myftija deleted the feature/deployment-telemetry-org-slug branch August 26, 2026 12:13
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.

2 participants