Skip to content

mode

Package: @autotracer/plugin-vite-flow  ·  Layer: Build  ·  Type: "opt-in" | "opt-out"  ·  Default: "opt-out"


mode is a build configuration option for flowTracer() — the Vite plugin initializer of the @autotracer/plugin-vite-flow Flow build-time instrumentation package. It controls whether eligible functions are instrumented by default.

In "opt-out" mode, eligible functions are instrumented unless @trace-disable removes them. In "opt-in" mode, eligible functions stay uninstrumented unless @trace enables them.

mode operates only within the eligible set that remains after include and exclude. Read together with pragma comments, include, and exclude.

Default

If you omit mode, FlowTracer uses "opt-out".

Values

  • "opt-out": instrument eligible functions unless @trace-disable is present.
  • "opt-in": instrument eligible functions only when @trace is present.

Usage

typescript
flowTracer({
  mode: "opt-in",
});

Released under the MIT License.