Sets up OpenTelemetry tracing that exports to the Datadog Agent (SPEC §5):
http/protobuf
http://<agent>:4318/v1/traces
grpc
http://<agent>:4317
serviceName
serviceVersion
environment
service.name
service.version
deployment.environment.name
service
version
env
DD_TAGS
datadog
tracecontext
baggage
error.*
Unset fields come from DatadogApmConfig (environment by default).
const tracing = initTracing({ serviceName: "checkout", environment: "prod" });await withSpan("charge", async () => { ... });await tracing.shutdown(); Copy
const tracing = initTracing({ serviceName: "checkout", environment: "prod" });await withSpan("charge", async () => { ... });await tracing.shutdown();
Sets up OpenTelemetry tracing that exports to the Datadog Agent (SPEC §5):
http/protobuftohttp://<agent>:4318/v1/tracesby default, orgrpctohttp://<agent>:4317(the Agent needs its OTLP receiver enabled);serviceName/serviceVersion/environment→ resourceservice.name/service.version/deployment.environment.name(Datadogservice,version,env), plusDD_TAGSas resource attributes;datadog,tracecontext,baggageby default (Datadog headers win on conflict);error.*attributes and the terminated-context link.Unset fields come from DatadogApmConfig (environment by default).