Struct Nemo Relay Metric Measurement

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.

#[repr(C)]pub struct NemoRelayMetricMeasurement {
    pub name: *const c_char,
    pub kind: NemoRelayMetricKind,
    pub value_type: NemoRelayMetricValueType,
    pub u64_value: u64,
    pub i64_value: i64,
    pub f64_value: f64,
    pub unit: *const c_char,
    pub description: *const c_char,
    pub attributes_json: *const c_char,
    pub boundaries: *const f64,
    pub boundaries_len: usize,
}

C representation of one typed metric SDK recording operation.

value_type selects exactly one of u64_value, i64_value, or f64_value. unit, description, and attributes_json are optional. A null boundaries pointer with boundaries_len == 0 leaves histogram boundaries unspecified. A non-null pointer with zero length requests an explicit empty boundary list. For nonzero lengths, boundaries must point to that many doubles.

Fields

name: *const c_char

Required null-terminated OpenTelemetry instrument name.

kind: NemoRelayMetricKind

Required instrument kind. NEMO_RELAY_METRIC_KIND_UNSPECIFIED is invalid.

value_type: NemoRelayMetricValueType

Required numeric value representation. NEMO_RELAY_METRIC_VALUE_TYPE_UNSPECIFIED is invalid.

u64_value: u64

Unsigned value used when value_type is U64.

i64_value: i64

Signed value used when value_type is I64.

f64_value: f64

Double value used when value_type is F64.

unit: *const c_char

Optional null-terminated ASCII unit.

description: *const c_char

Optional null-terminated description.

attributes_json: *const c_char

Optional null-terminated JSON attributes object.

boundaries: *const f64

Optional histogram boundary array.

boundaries_len: usize

Number of entries in boundaries.

Trait Implementations

impl Clone for NemoRelayMetricMeasurement

impl Clone for NemoRelayMetricMeasurement

clone

fn clone(&self) -> NemoRelayMetricMeasurement

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for NemoRelayMetricMeasurement

impl Debug for NemoRelayMetricMeasurement

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Copy for NemoRelayMetricMeasurement

impl Copy for NemoRelayMetricMeasurement