Repository navigation
v0.93.0
Every statement is published on a Node diagnostics_channel tracing
channel, so a tracer or APM agent sees Turbine queries with no setup in the
application. No query changes its SQL or its result.
Added
- The
turbine:querytracing channel. Each statement that emits a
$on('query')event is also published on
diagnostics_channel.tracingChannel('turbine:query'), with
{ model, operation, sql, paramCount, rowCount, durationMs, error? }plus
batchandretriedwhere they apply.sqlis the parametrized text and
the context never carries a bound value or a result row. The transaction
control Turbine sends (BEGIN,COMMIT,ROLLBACK, savepoints,
sessionContextsettings) is published too, asmodel: '$raw',
operation: '$transaction', anddb.$notifyasoperation: '$notify'.
startruns in the caller's async context, so the span active there
becomes the parent. It
covers model methods (nestedwithreads included), raw and typed SQL,
statements inside$transaction, pipelines and batch transactions, and
works without a$onlistener. Without a subscriber a statement costs one
hasSubscriberscheck. The name is exported asQUERY_CHANNELand the
context type asQueryChannelContext. Published on Node 20.16, 22.3 and
later; edge runtimes publish nothing and the edge entry imports no new
builtin.