Skip to main content

instrumentConsumer

@forge/monorepo


@forge/monorepo / backend/src / instrumentConsumer

Function: instrumentConsumer()

instrumentConsumer(inner, deps): JobConsumer

Defined in: backend/src/telemetry/instrument.ts:110

Wrap a consumer so each job continues its producer's trace and claim latency is recorded.

The handler runs inside the claim span, so everything the run does — model calls, tool calls, an approval wait — is a descendant of it and of the original request. That is AC-1: one user request, one trace, across three processes.

Parameters

inner

JobConsumer

deps

InstrumentedConsumerDeps

Returns

JobConsumer