feat(instrumentation): Add deployment metadata to telemetry#578
Merged
Conversation
Attach the Vercel deployment ID and release version to every outgoing Sentry span so traces can be filtered by the exact deployment that emitted them. Document deployment.id in the tracing semantics specs alongside the existing deployment environment metadata. Co-Authored-By: GPT-5 Codex <codex@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
seems silly to put it on all spans but tracing is silly by design so 🤷 |
Share Vercel deployment telemetry attributes between span enrichment and the logging facade so emitted log records carry the same deployment.id and service.version values. Cover the logging attribute contract with a focused unit test. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Normalize deployment telemetry env values before emitting them on spans and logs. Keep deployment metadata authoritative over event-local log attributes, move the shared helper out of chat ownership, and document the logging contract. Add focused span enrichment coverage alongside the log record test. Co-Authored-By: GPT-5 Codex <codex@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c4012ac. Configure here.
Use the existing deployment module for deployment telemetry helpers instead of a standalone telemetry module. Normalize the Sentry release value with the same deployment service version used on spans and logs so blank releases fall back to the Vercel commit SHA consistently. Co-Authored-By: GPT-5 Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Sentry span export and Junior log records now attach the same normalized Vercel deployment metadata. A shared root helper emits
deployment.idfromVERCEL_DEPLOYMENT_IDandservice.versionfromSENTRY_RELEASE, falling back toVERCEL_GIT_COMMIT_SHAwhen the release is blank or unset. Deployment identity is applied centrally and wins over event-local span or log attributes so each telemetry record stays tied to the emitting deployment.The telemetry specs now list
deployment.idfor tracing and logging, andspecs/instrumentation.mddocuments the scope rule: global process/deployment attributes may be repeated on every span/log, while operation-local facts such as HTTP status codes stay on the span or log record that observed them.Validated with targeted span/log unit tests, package typecheck, the chat dependency boundary check, and the package build.