Use this file to discover all available pages before exploring further.
dd-trace instruments messaging and queue libraries to produce producer and consumer spans. When Data Streams Monitoring is enabled, these plugins also propagate DSM context through message headers for end-to-end pipeline latency tracking.
Data Streams Monitoring (DSM) provides end-to-end latency and throughput metrics for your data pipelines. Enable it in tracer.init() or via the environment variable:
Producer spans inject trace context into message headers. Consumer spans extract that context and continue the trace. This enables end-to-end distributed tracing across service boundaries.For AWS SQS and similar services, context is injected into the MessageAttributes of each message. You can control batch propagation with the batchPropagationEnabled option.
const tracer = require('dd-trace').init()tracer.use('bullmq', { service: 'job-queue'})const { Queue, Worker } = require('bullmq')// Producer spans are created automatically when jobs are addedconst queue = new Queue('emails')await queue.add('send-welcome', { userId: '123' })// Consumer spans are created automatically when jobs are processedconst worker = new Worker('emails', async job => { await sendWelcomeEmail(job.data.userId)})