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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strange-papayas-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vercel/otel": patch
---

Update documentation
2 changes: 1 addition & 1 deletion packages/otel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Registers the OpenTelemetry SDK with the specified service name and the default
Registers the OpenTelemetry SDK with the specified configuration. Configuration options include:

- `serviceName`: The name of your service, used as the app name in many OpenTelemetry backends.
- `attributes`: The resource attributes. By default, `@vercel/otel` configures relevant Vercel attributes based on [the environment](https://vercel.com/docs/projects/environment-variables/system-environment-variables), such as `vercel.env`, `vercel.runtime`, `vercel.host`, etc.
- `attributes`: The resource attributes. By default, `@vercel/otel` configures relevant Vercel attributes based on [the environment](https://vercel.com/docs/projects/environment-variables/system-environment-variables), such as `vercel.env`, `vercel.runtime`, `vercel.host`, etc. The specified attributes are merged with default Vercel environment attributes.
- `instrumentations`: A set of instrumentations. By default, `@vercel/otel` configures "fetch" instrumentation.
- `instrumentationConfig`: Customize configuration for predefined instrumentations:
- `fetch`: Customize configuration of the predefined "fetch" instrumentation:
Expand Down
4 changes: 3 additions & 1 deletion packages/otel/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface Configuration {
serviceName?: string;

/**
* The resource attributes.
* The additional resource attributes to apply to all spans.
* By default, `@vercel/otel` configures relevant Vercel attributes based on the
* [environment](https://vercel.com/docs/projects/environment-variables/system-environment-variables),
* including:
Expand All @@ -68,6 +68,8 @@ export interface Configuration {
* - `vercel.sha` - the Vercel deployment Git SHA (`VERCEL_GIT_COMMIT_SHA` environment variable).
* - `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).
*
* Any additional attributes will be merged with the default attributes.
gaspar09 marked this conversation as resolved.
Show resolved Hide resolved
*/
attributes?: ResourceAttributes;

Expand Down
Loading