Skip to main content
This feature is in preview. The API may change before general availability. To try it out, contact support@intunedhq.com and we’ll enable it for your workspace.
Keep part of a traced attempt out of its trace and logs. While a without_tracing block runs, the browser trace and the automation logs aren’t recorded, so values your automation types or reads there never reach a stored trace or log. Use it around the few lines that touch secrets: filling a password, entering a one-time code, or reading a record you aren’t allowed to retain.
Pausing tracing is narrower than turning tracing off. Setting saveTrace to false on the Run request, or defaults.saveTrace in Intuned.json, discards the trace for a whole Run, which also removes the trace you need to debug the rest of the automation. Use without_tracing when you only need a gap.

Function reference

without_tracing

An async context manager that pauses tracing for the body of the async with block, and resumes it when the block exits. Tracing resumes even if the block raises, so a failure in the middle of a sensitive step doesn’t leave the rest of the attempt unrecorded. The exception propagates. It only has an effect when the attempt is traced. When tracing is off, the block runs normally and its logs are kept.
The TypeScript SDK takes a callback instead: withoutTracing(fn).
Returns Returns an async context manager. The block’s own values are unaffected. Raises Propagates anything the block raises. If tracing can’t be paused, entering the block raises and the body doesn’t run, so the code you meant to hide never runs while it could still be recorded. Example

What pausing covers

While a without_tracing block is running:
  • Browser trace: no actions, DOM snapshots, screenshots, or network requests are recorded. The trace viewer shows a gap.
  • Automation logs: anything written to stdout or stderr, including print and logging output, is left out of the attempt’s logs. This applies to deployed runs. Under intuned dev, output still prints in your terminal.
This covers everything on the attempt, not only the code inside the block. Code running at the same time outside the block, for example in another asyncio task, is also left out. What is still recorded:
  • What the block leaves behind. A field it filled, or a token still on screen, appears in the first snapshot after the block. Navigate away or clear the field before the block ends.
  • The session it creates. Cookies and auth headers on later requests are recorded as usual.
  • Your automation’s source code. Traces include the API’s source files, so a secret written directly in your code appears in the trace. Pass secrets in through parameters, an auth session, or environment variables.
  • The Run and Attempt records: status, timing, and retry history.
  • Your automation’s return value, and the Run’s parameters. To keep a value out of the Run record entirely, use ephemeral parameters.
  • Errors. A raised exception’s message and traceback are stored on the attempt, even if it was raised inside the block.
Never put a secret in an exception message. Error details are stored on the attempt whether or not tracing is paused.

Behavior notes

  • Nesting works. Nested and concurrent blocks are safe: tracing pauses when the first one starts and resumes when the last one ends.
  • Keep the work inside the block. If the attempt ends while a block is still open, for example in a task that was never awaited, nothing recorded after the block started is kept.
  • Each attempt is separate. Every attempt has its own trace, so a retry starts traced.
  • Local development included. Under intuned dev, a locally captured trace has the same gaps a deployed one would.