Function: attachChatTurnTelemetry()
attachChatTurnTelemetry(
app,options?):void
Install chatTurnTelemetryMiddleware on a Mastra Express sub-app.
Call before MastraServer.init() so the layer sits ahead of the agent
routes. Safe to call unconditionally: when no recording tracer is registered,
the middleware is a no-op.
Parameters
Section titled “Parameters”Express
options?
Section titled “options?”Returns
Section titled “Returns”void