@psyqueue/plugin-otel-tracing
v0.1.0
Published
> OpenTelemetry distributed tracing for PsyQueue. Trace context propagation from enqueue to process.
Readme
@psyqueue/plugin-otel-tracing
OpenTelemetry distributed tracing for PsyQueue. Trace context propagation from enqueue to process.
Installation
npm install @psyqueue/plugin-otel-tracing @opentelemetry/api @opentelemetry/sdk-trace-node @opentelemetry/sdk-trace-baseUsage
import { otelTracing } from '@psyqueue/plugin-otel-tracing'
q.use(otelTracing({
serviceName: 'my-worker',
exporter: 'console',
traceEnqueue: true,
traceProcess: true,
}))Configuration
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| serviceName | string | required | OTel service name |
| exporter | 'console' \| 'memory' | 'console' | Span exporter |
| traceEnqueue | boolean | true | Trace enqueue operations |
| traceProcess | boolean | true | Trace process operations |
| attributes | (job) => Record<string, string \| number> | - | Custom span attributes |
Documentation
See Observability Plugins for detailed usage.
License
MIT
