This library is OpenTracing compliant. Use the (OpenTracing API and the Datadog Tracer (dd-trace) library to measure execution times for specific pieces of code. In the following example, a Datadog Tracer is initialized and used as a global tracer:
// server.js const tracer = require('dd-trace').init(); const opentracing = require('opentracing'); opentracing.initGlobalTracer(tracer); const app = require('./app.js'); // app.js const tracer = opentracing.globalTracer();
The following tags are available to override Datadog specific options:
service.name: The service name to be used for this span. The service name from the tracer is used if this is not provided.
resource.name: The resource name to be used for this span. The operation name is used if this is not provided.
span.type: The span type to be used for this span. The span type falls back to
customif not provided.