Skip to content

Metric 'gateway_service_count' type should be gauge not counter #250

@xueli-daisy

Description

@xueli-daisy

From Prometheus metric type: https://prometheus.io/docs/concepts/metric_types/, I know that a counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart. A gauge is a metric that represents a single numerical value that can arbitrarily go up and down.

Behavior:
I can saw the value of 'gateway_service_count{function_name="***"}' goes up and down, so I think the type of gateway_service_count is gauge.
And in the code, it is also be defined as a gauge.
expectedServiceReplicasGaugeDesc := Desc{fqName: "gateway_service_count", help: "Service replicas", constLabels: {}, variableLabels: [function_name]}

Suggestion:
Change the metric 'gateway_service_count' type to a gauge in https://docs.openfaas.com/architecture/metrics/.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions