SnapOtter and GitHub
3fb8164fa5
feat: add OpenTelemetry distributed tracing (enterprise) ( #232 )
...
* feat(tracing): add OpenTelemetry dependencies and --import preload flag
* feat(enterprise): add distributed_tracing feature gate
* feat(tracing): add SDK bootstrap with enterprise gating
* fix(tracing): correct test coverage for enterprise-unavailable path and prevent double-init
Test 2 now mocks @snapotter/enterprise to throw an import error, exercising
the catch block in the preload. Test 3 imports with no endpoint so the preload
is a no-op, avoiding leaked SDK from double-initialization. Added idempotency
guard to initTracing() as a safety net.
* feat(tracing): add Pino trace mixin and shared logger
When OTel tracing is active, every Pino log line now includes traceId,
spanId, and traceFlags fields for log-to-trace correlation. The mixin
is a no-op when no SDK is registered (community users).
* feat(tracing): add _otel to ToolJobData and inject trace context at enqueue
Add optional _otel carrier field to ToolJobData for W3C trace context
propagation across BullMQ job boundaries. When an active OTel span exists,
propagation.inject() writes traceparent/tracestate into the job data before
queue.add(). When no SDK is registered (community edition), the carrier
stays empty and _otel remains undefined -- zero overhead.
* feat(tracing): extract trace context and create spans in BullMQ worker
* feat(tracing): inject trace context into Python sidecar calls
* feat(tracing): add trace context extraction to Python sidecar
* feat(tracing): add shutdownTracing to graceful shutdown sequence
* feat(tracing): enrich HTTP spans with tool_id and user_id attributes
* docs: add OpenTelemetry env var documentation to .env.example
* test(tracing): add lifecycle integration tests for trace propagation
* fix(tracing): inject trace context into pipeline and batch flow jobs
* fix(tracing): add sidecar.execute Node-side span and remove unnecessary comment
Wraps PythonDispatcher.run() with a sidecar.execute span on the Node
side so traces show the full round-trip (Node span -> Python span).
Also removes an obvious comment from logger.ts.
2026-06-15 12:53:06 +08:00
..
2026-05-12 23:19:20 +08:00
2026-06-13 10:18:49 +08:00
2026-05-12 23:19:20 +08:00
2026-06-06 19:37:29 +08:00
2026-05-12 23:19:20 +08:00
2026-05-15 21:35:02 +08:00
2026-06-13 10:18:49 +08:00
2026-05-13 15:47:28 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:15:23 +08:00
2026-05-14 17:42:07 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:06 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:15:23 +08:00
2026-06-14 14:53:44 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:19:47 +08:00
2026-06-13 10:19:47 +08:00
2026-06-13 10:19:16 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:17:13 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:47 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:49 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:17:13 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:18:49 +08:00
2026-05-11 17:33:51 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:39 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:19:16 +08:00
2026-05-14 16:59:40 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:11 +08:00
2026-05-13 13:45:08 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 16:32:45 +08:00
2026-05-12 03:58:42 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:18:55 +08:00
2026-05-15 21:35:02 +08:00
2026-06-08 15:49:47 +08:00
2026-06-06 19:37:29 +08:00
2026-05-18 18:16:07 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 12:59:45 +08:00
2026-05-18 17:48:21 +08:00
2026-06-10 22:01:13 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:19:00 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:16 +08:00
2026-06-10 22:01:13 +08:00
2026-06-06 21:45:39 +08:00
2026-06-13 10:18:55 +08:00
2026-05-09 19:52:11 +08:00
2026-06-13 10:19:16 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:00 +08:00
2026-05-09 18:02:58 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:18:49 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:39 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:19:00 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:18:49 +08:00
2026-05-18 17:48:21 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:19:47 +08:00
2026-06-13 10:15:23 +08:00
2026-05-09 18:02:58 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:18:39 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:39 +08:00
2026-06-13 10:18:39 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:18:55 +08:00
2026-06-05 23:05:25 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:18:55 +08:00
2026-06-13 10:19:00 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:00 +08:00
2026-05-13 16:59:13 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:15:23 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 10:15:23 +08:00
2026-06-13 12:59:45 +08:00
2026-06-10 22:01:13 +08:00
2026-06-06 19:37:29 +08:00
2026-06-14 16:50:35 +08:00
2026-06-14 14:53:44 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:18:39 +08:00
2026-06-13 10:19:06 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:18:49 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:19:00 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:17:13 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:15:23 +08:00
2026-06-14 14:30:35 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:19:47 +08:00
2026-06-15 12:53:06 +08:00
2026-06-13 10:19:47 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:18:55 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:17:13 +08:00
2026-05-09 18:02:58 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:16 +08:00
2026-06-13 10:19:06 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:18:55 +08:00
2026-06-06 19:37:29 +08:00
2026-06-13 10:19:00 +08:00
2026-06-13 10:19:06 +08:00
2026-06-14 16:50:35 +08:00
2026-06-13 10:18:49 +08:00
2026-06-13 10:17:13 +08:00
2026-06-13 10:19:11 +08:00
2026-06-13 10:19:11 +08:00