Skip to navigation

Function metric

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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 metric(params: EmitMetricEventParams<'_>) -> Result<(), FlowError>

Emit a Relay metric mark under the current or provided scope.

The measurements are validated as one atomic envelope before the mark is queued. The emitted mark uses the Relay-owned metric data schema so metric exporters can route it without relying on mutable metadata.

Errors

Returns FlowError::InvalidArgument when the measurement envelope is invalid, or any error returned while emitting the underlying mark.