create_gauge
Creates a new Gauge metric.The name of the registry to create the gauge in (typically “default”).
The name of the gauge metric.
A description of what the gauge measures.
A list of label names for this metric. The order matters and must match when setting values.
Returns
Ok(Nil)if the gauge was created successfullyError(String)with an error message if creation failed (e.g., “Metric already exists”)
Example
set_gauge
Sets the value of the Gauge.The name of the registry where the gauge exists.
The name of the gauge metric to set.
A list of label values for this observation. Must match the number and order of labels defined when creating the gauge.
The value to set the gauge to. Can be any integer value.
Returns
Ok(Nil)if the gauge was set successfullyError(String)with an error message if the operation failed (e.g., “Unknown metric” or “Invalid metric arity (labels mismatch)“)