Function event

View as Markdown

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.

pub fn event(params: EmitMarkEventParams<'_>) -> Result<()>

Emit a standalone mark event under the current or provided scope.

This creates a point-in-time lifecycle event without pushing or popping a new scope.

Parameters

  • name: Event name to emit.
  • parent: Optional explicit parent scope. When None, the current top of stack is used.
  • data: Optional JSON payload recorded on the emitted event.
  • data_schema: Optional name and version identifying the data payload.
  • metadata: Optional JSON metadata recorded on the emitted event.
  • severity: Optional typed severity stored in reserved mark metadata.
  • category: Optional semantic mark category.
  • category_profile: Optional category-specific profile.
  • timestamp: Optional timestamp recorded on the emitted mark event. When None, the current UTC time is used.

Returns

A Result that is Ok(()) after the event has been queued for sanitization and publication.

Errors

Returns an error when the runtime owner check fails or when internal state cannot be read safely. Returns FlowError::InvalidArgument when a typed severity is provided with non-object metadata.

Notes

The mark event is queued with subscriber and sanitizer snapshots captured from the active scope stack.