Skip to content

policyTrace

policyTrace(c, policyName): TraceReporter

Defined in: src/policies/sdk/trace.ts:87

Get a trace reporter for a specific policy.

When tracing is active (_stomaTraceRequested is truthy), returns a function that stores the detail on the context. When inactive, returns noopTraceReporter - a no-op with zero overhead.

Context

Hono request context.

string

Policy name used as the Map key.

TraceReporter

A TraceReporter - always callable.