Optional attributesThe additional resource attributes to apply to all spans.
By default, @vercel/otel configures relevant Vercel attributes based on the
environment,
including:
service.name - the service name.node.env - the value of NODE_ENV environment variable.deployment.environment.name - the Vercel deployment environment.cloud.region - the Vercel deployment region.process.runtime.name - the runtime when the SDK can determine it, such as "nodejs" or "edge".vcs.ref.head.name - the Vercel Git ref when available.vcs.ref.head.revision - the Vercel Git SHA.vcs.repository.name - the Vercel repository slug when available.deployment.id - the Vercel deployment ID.service.version - the Vercel deployment ID.env and vercel.*.env - the Vercel deployment environment such as "production" or "preview" (VERCEL_ENV environment variable).vercel.region - the Vercel deployment region (VERCEL_REGION environment variable).vercel.runtime - "nodejs" or "edge" (NEXT_RUNTIME environment variable).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).vercel.deployment_id - the Vercel deployment ID (VERCEL_DEPLOYMENT_ID environment variable).Any additional attributes will be merged with the default attributes.
Optional attributesThis configuration is used to compute root span's attributes based on the request's headers. The value can be one of the following:
Optional autoOptional contextOptional idOptional instrumentationCustomize configuration for predefined instrumentations:
Optional instrumentationsA set of instrumentations.
By default, @vercel/otel configures "fetch" instrumentation.
Optional logOptional metricOptional propagatorsA set of propagators that may extend inbound and outbound contexts.
Use the "auto" value to include all default propagators.
By default, @vercel/otel configures W3C Trace Context propagator.
This option can be also configured via the OTEL_PROPAGATORS environment variable.
Example: { propagators: ["auto", new MyPropagator()] }
Optional resourceOptional serviceThe name of your service, used as the app name in many OpenTelemetry backends.
Can be overriden by the OTEL_SERVICE_NAME environment variable.
Optional spanOptional spanA set of span processors to be used to process captured spans.
Use the "auto" value to include all default span processors.
By default, @vercel/otel auto-configures an export processor based on the environment.
See traceExporter for more details.
Optional traceA custom exporter for traces.
Use the "auto" value to include the best export mechanism for the environment.
By default, @vercel/otel configures the best export mechanism for the
environment. For instance, if a tracing integrations is
configured on Vercel, this integration will be automatically used for export; otherwise an
OTLP exporter
can be used if configured via environment variables, such as OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL
and OTEL_EXPORTER_OTLP_HEADERS.
Optional traceThe sampler to be used to decide which requests should be traced.
Use the "auto" value to use the default sampler.
By default, all requests are traced. This option can be changed to,
for instance, only trace 1% of all requests.
This option can also be configured via the OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG environment variable.
Optional views
OpenTelemetry SDK configuration.