Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a custom collector to avoid checking labels
In order to avoid checking label sets stay the same across all the emitted metrics, use a custom collector instead of going over one of prometheus' provided ones. Because of the use case (create a registry, discard it after one time), this probably also reduces the resource usage. The reason for this workaround is that in case of failure, the emitted metrics have different labelsets. Specifically, labels describing the error are added. If we end up with a mix of successful and unsuccessful requests, prometheus will reject one of the metrics because they are using different sets of labels. Reevaluate this later. Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
- Loading branch information