guiqi695/moon-prometheus-sdk/metric does not have a README file

    MetricError

    pub(all) suberror MetricError {
    InvalidName(String)
    InvalidLabelName(String)
    DuplicateLabelName(String)
    ReservedLabelName(String)
    InvalidHelp(String)
    InvalidUnit(String)
    NegativeCounterDelta(Double)
    NonFiniteCounterDelta(Double)
    InvalidBucketOrder
    InvalidBucketBoundary(Double)
    NonFiniteObservation
    } derive(Eq,
    Debug
    )

    Errors shared by metric constructors and update operations.

    Counter

    A monotonically increasing metric backed by deterministic portable storage.

    Counter::add

    fn Counter::add(self : Counter, delta : Double) -> Unit raise MetricError

    Counter::descriptor

    fn Counter::descriptor(self : Counter) -> Descriptor

    Counter::get

    fn Counter::get(self : Counter) -> Double

    Counter::help

    fn Counter::help(self : Counter) -> String

    Counter::inc

    fn Counter::inc(self : Counter) -> Unit

    Counter::labels

    fn Counter::labels(self : Counter) -> Array[Label]

    Counter::name

    fn Counter::name(self : Counter) -> String

    Counter::new

    fn Counter::new(name : String, help? : String, unit? : String, const_labels? : Array[Label]) -> Counter raise MetricError

    Counter::snapshot

    fn Counter::snapshot(self : Counter) -> ScalarMetricSnapshot

    Counter::unit

    fn Counter::unit(self : Counter) -> String?

    Descriptor

    pub struct Descriptor {
    name : String
    help : String
    unit : String?
    kind : MetricKind
    const_labels : Array[Label]
    variable_label_names : Array[String]
    }

    Immutable identity and exposition metadata for one metric family.

    Descriptor::const_labels

    fn Descriptor::const_labels(self : Descriptor) -> Array[Label]

    Descriptor::help

    fn Descriptor::help(self : Descriptor) -> String

    Descriptor::identity

    fn Descriptor::identity(self : Descriptor) -> DescriptorIdentity

    Descriptor::kind

    fn Descriptor::kind(self : Descriptor) -> MetricKind

    Descriptor::name

    fn Descriptor::name(self : Descriptor) -> String

    Descriptor::new

    fn Descriptor::new(name : String, kind : MetricKind, help? : String, unit? : String, const_labels? : Array[Label], variable_label_names? : Array[String]) -> Descriptor raise MetricError

    Descriptor::unit

    fn Descriptor::unit(self : Descriptor) -> String?

    Descriptor::variable_label_names

    fn Descriptor::variable_label_names(self : Descriptor) -> Array[String]

    DescriptorIdentity

    pub(all) struct DescriptorIdentity {
    name : String
    kind : MetricKind
    const_labels : Array[Label]
    variable_label_names : Array[String]
    } derive(Eq,
    Debug
    )

    Canonical identity used to compare descriptor registration intent.

    Const-label order does not affect this value. Variable-label order does: values supplied to a vector are positional in that declared order.

    Gauge

    A metric that may increase or decrease.

    Gauge::add

    fn Gauge::add(self : Gauge, delta : Double) -> Unit

    Gauge::dec

    fn Gauge::dec(self : Gauge) -> Unit

    Gauge::descriptor

    fn Gauge::descriptor(self : Gauge) -> Descriptor

    Gauge::get

    fn Gauge::get(self : Gauge) -> Double

    Gauge::help

    fn Gauge::help(self : Gauge) -> String

    Gauge::inc

    fn Gauge::inc(self : Gauge) -> Unit

    Gauge::labels

    fn Gauge::labels(self : Gauge) -> Array[Label]

    Gauge::name

    fn Gauge::name(self : Gauge) -> String

    Gauge::new

    fn Gauge::new(name : String, help? : String, unit? : String, const_labels? : Array[Label]) -> Gauge raise MetricError

    Gauge::set

    fn Gauge::set(self : Gauge, value : Double) -> Unit

    Gauge::snapshot

    fn Gauge::snapshot(self : Gauge) -> ScalarMetricSnapshot

    Gauge::sub

    fn Gauge::sub(self : Gauge, delta : Double) -> Unit

    Gauge::unit

    fn Gauge::unit(self : Gauge) -> String?

    Histogram

    pub struct Histogram {
    descriptor : Descriptor
    boundaries : Array[Double]
    value :
    HistogramCell

    }

    A histogram with fixed, strictly increasing bucket boundaries.

    Histogram::boundaries

    fn Histogram::boundaries(self : Histogram) -> Array[Double]

    Histogram::descriptor

    fn Histogram::descriptor(self : Histogram) -> Descriptor

    Histogram::help

    fn Histogram::help(self : Histogram) -> String

    Histogram::labels

    fn Histogram::labels(self : Histogram) -> Array[Label]

    Histogram::name

    fn Histogram::name(self : Histogram) -> String

    Histogram::new

    fn Histogram::new(name : String, boundaries : Array[Double], help? : String, unit? : String, const_labels? : Array[Label]) -> Histogram raise MetricError

    Histogram::observe

    fn Histogram::observe(self : Histogram, value : Double) -> Unit raise MetricError

    Histogram::snapshot

    fn Histogram::snapshot(self : Histogram) -> HistogramSnapshot

    Histogram::unit

    fn Histogram::unit(self : Histogram) -> String?

    HistogramSnapshot

    pub(all) struct HistogramSnapshot {
    boundaries : Array[Double]
    cumulative_counts : Array[Int64]
    count : Int64
    sum : Double
    } derive(Eq,
    Debug
    )

    Immutable observation snapshot consumed by exporters.

    Label

    pub(all) struct Label {
    name : String
    value : String
    } derive(Eq, Hash,
    Debug
    )

    A single Prometheus label pair.

    MetricKind

    pub(all) enum MetricKind {
    CounterKind
    GaugeKind
    HistogramKind
    } derive(Eq, Hash,
    Debug
    )

    Metric family kinds supported by the P0 data model.

    ScalarMetricSnapshot

    pub(all) struct ScalarMetricSnapshot {
    value : Double
    } derive(Eq,
    Debug
    )

    Detached value of a Counter or Gauge at one instant.

    Snapshot values are intentionally value types. Updating their originating metric later never changes an already returned snapshot.

    validate_help

    fn validate_help(help : String) -> Unit raise MetricError

    validate_histogram_boundaries

    fn validate_histogram_boundaries(boundaries : Array[Double]) -> Unit raise MetricError

    validate_label_name

    fn validate_label_name(name : String) -> Unit raise MetricError

    validate_metric_name

    fn validate_metric_name(name : String) -> Unit raise MetricError

    validate_unit

    fn validate_unit(unit : String) -> Unit raise MetricError