Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xueli-daisy opened this issue Dec 18, 2020 · 1 comment
Open

Comments

@xueli-daisy
Copy link

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.

@alexellis
Copy link
Member

This seems like a fair description of events. Thanks for letting us know that we have a metric called a count which is actually used like a gauge.

Out of interest are you wanting to send a PR for this?

Is there a chance that it could break compatibility?

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants