@grow-codes/datadog-apm - v0.1.1
    Preparing search index...

    Function initTracing

    • Sets up OpenTelemetry tracing that exports to the Datadog Agent (SPEC §5):

      • OTLP http/protobuf to http://<agent>:4318/v1/traces by default, or grpc to http://<agent>:4317 (the Agent needs its OTLP receiver enabled);
      • unified service tagging: serviceName / serviceVersion / environment → resource service.name / service.version / deployment.environment.name (Datadog service, version, env), plus DD_TAGS as resource attributes;
      • propagators datadog, tracecontext, baggage by default (Datadog headers win on conflict);
      • span processors that set the Datadog error.* attributes and the terminated-context link.

      Unset fields come from DatadogApmConfig (environment by default).

      Parameters

      Returns DatadogTracingHandle

      const tracing = initTracing({ serviceName: "checkout", environment: "prod" });
      await withSpan("charge", async () => { ... });
      await tracing.shutdown();