Skip to content

fix: add project id to attributes#170

Merged
kakadiadarpan merged 4 commits intomainfrom
darpan/add-project-id-to-attributes
Sep 30, 2025
Merged

fix: add project id to attributes#170
kakadiadarpan merged 4 commits intomainfrom
darpan/add-project-id-to-attributes

Conversation

@kakadiadarpan
Copy link
Copy Markdown
Collaborator

@kakadiadarpan kakadiadarpan commented Sep 29, 2025

Add vercel.project_id resource attribute

Port to v1: #171

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 29, 2025

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

Project Deployment Preview Comments Updated (UTC)
otel-site Ready Ready Preview Comment Sep 30, 2025 0:00am

Copy link
Copy Markdown

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

Additional Comments:

packages/otel/src/types.ts (line 70):

The documentation is missing the newly added vercel.project_id attribute that was implemented in sdk.ts.

View Details
📝 Patch Details
diff --git a/packages/otel/src/types.ts b/packages/otel/src/types.ts
index 1f3b2c5..0984dd9 100644
--- a/packages/otel/src/types.ts
+++ b/packages/otel/src/types.ts
@@ -68,6 +68,7 @@ export interface Configuration {
    * - `vercel.host` - the Vercel deployment host for the Git SHA (`VERCEL_URL` environment variable).
    * - `vercel.branch_host` - the Vercel deployment host for the branch (`VERCEL_BRANCH_URL` environment variable).
    * - `vercel.deployment_id` - the Vercel deployment ID (`VERCEL_DEPLOYMENT_ID` environment variable).
+   * - `vercel.project_id` - the Vercel project ID (`VERCEL_PROJECT_ID` environment variable).
    *
    * Any additional attributes will be merged with the default attributes.
    */

Analysis

Missing documentation for vercel.project_id attribute in types.ts

What fails: The Configuration.attributes JSDoc in packages/otel/src/types.ts lists all automatically added Vercel resource attributes except vercel.project_id, which is implemented in sdk.ts line 147

How to reproduce:

  1. Check sdk.ts line 147: "vercel.project_id": process.env.VERCEL_PROJECT_ID || undefined,
  2. Check types.ts lines 63-71: documentation lists vercel.deployment_id but not vercel.project_id

Result: Developer documentation is incomplete - users won't know that vercel.project_id is automatically added

Expected: Documentation should include vercel.project_id entry per Vercel system environment variables showing it as official variable

This reverts commit 537257d.
@kakadiadarpan kakadiadarpan merged commit 9a695ad into main Sep 30, 2025
8 checks passed
@kakadiadarpan kakadiadarpan deleted the darpan/add-project-id-to-attributes branch September 30, 2025 12:27
@github-actions github-actions bot mentioned this pull request Sep 30, 2025
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