Sets a component span attribute used for slicing traces in Datadog (filtering,
coloring, dashboards). All backend spans share a single Datadog service (api) because
Vercel's OTLP forwarding sets service.name at the resource level and Datadog's hosted
OTLP intake does not honor per-span service.name overrides. The component tag gives
the per-layer separation we want without per-span service overrides.
Components can be disabled at runtime via the OTEL_DISABLED_COMPONENTS env var
(comma-separated). When disabled, withSpan runs fn without creating a new span.
Sets a
componentspan attribute used for slicing traces in Datadog (filtering, coloring, dashboards). All backend spans share a single Datadog service (api) because Vercel's OTLP forwarding sets service.name at the resource level and Datadog's hosted OTLP intake does not honor per-span service.name overrides. Thecomponenttag gives the per-layer separation we want without per-span service overrides.Components can be disabled at runtime via the
OTEL_DISABLED_COMPONENTSenv var (comma-separated). When disabled,withSpanrunsfnwithout creating a new span.