> This page is for NeMo Relay, version v0.7.3.
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.1) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.11.1: https://docs.nvidia.com/nemo/relay/v0.11.1/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Function nemo_relay_push_scope

> Push a new scope onto the scope stack.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

<pre />

Push a new scope onto the scope stack.

This creates a scope handle, emits a scope Start event, and makes the new scope the current top of the active stack.

## Parameters

* `name`: Null-terminated scope name.
* `scope_type`: The type of scope to create.
* `parent`: Optional parent scope handle, or null to use the current top of stack.
* `attributes`: Bitfield of scope attributes.
* `data_json`: Optional null-terminated JSON string stored on the scope handle, or null.
* `metadata_json`: Optional null-terminated JSON metadata string recorded on the start event, or null.
* `input_json`: Optional null-terminated JSON string exported as the semantic scope input on the start event, or null.
* `timestamp_unix_micros`: Optional Unix microseconds timestamp for the handle start time and start event, or null to use the current UTC time.
* `out`: On success, receives a heap-allocated `FfiScopeHandle` that must be freed with `nemo_relay_scope_handle_free`.

## Errors

Returns `InvalidJson` for invalid JSON inputs and `InvalidArg` when `timestamp_unix_micros` is outside the supported timestamp range.

## Safety

`name` must be a valid C string. `out` must be non-null. `parent`, `data_json`, `metadata_json`, `input_json`, and `timestamp_unix_micros` may be null; when non-null, optional pointers must be valid for reads for the duration of the call.