Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the behavior of the attributes field on registerOTel function #55

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

gaspar09
Copy link
Contributor

@gaspar09 gaspar09 commented Mar 21, 2024

Clarify the behavior of the attributes field on registerOTel function

The attributes field passed in to registerOTel is merged with default vercel env attributes

See:

[SemanticResourceAttributes.SERVICE_NAME]: serviceName,
// Node.
"node.ci": process.env.CI ? true : undefined,
"node.env": process.env.NODE_ENV,
// Vercel.
// https://vercel.com/docs/projects/environment-variables/system-environment-variables
"vercel.env":
process.env.VERCEL_ENV || process.env.NEXT_PUBLIC_VERCEL_ENV,
"vercel.region": process.env.VERCEL_REGION,
"vercel.runtime": runtime,
"vercel.sha":
process.env.VERCEL_GIT_COMMIT_SHA ||
process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
"vercel.host":
process.env.VERCEL_URL ||
process.env.NEXT_PUBLIC_VERCEL_URL ||
undefined,
"vercel.branch_host":
process.env.VERCEL_BRANCH_URL ||
process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ||
undefined,
...configuration.attributes,

Copy link

vercel bot commented Mar 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
otel-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2024 10:33pm

packages/otel/src/types.ts Show resolved Hide resolved
@gaspar09 gaspar09 merged commit 460586e into main Mar 21, 2024
6 checks passed
@gaspar09 gaspar09 deleted the gaspar/clarify-attributes branch March 21, 2024 22:35
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