I have a prometheus metric with labels declared like
errors_total = prometheus_client.Counter("errors_total", "Total errors", ["source", "code])
errors_total.labels("source"="initialization", code="100")
errors_total.labels("source"="shutingdown", code="200")
When I increment the metric in the place in the monitored code where the error happens, can I just use it as:
errors_total.labels(source="initialization").inc()
or
errors_total.labels(code="200").inc()
My question is can I just use one label when incrementing the metric?