PromPHP / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
424 stars 93 forks source link

Add methods to validate Metric Names & Labels Keys #41

Closed LKaemmerling closed 3 years ago

LKaemmerling commented 3 years ago

Signed-off-by: Lukas Kämmerling lukas.kaemmerling@hetzner-cloud.de

This brings basically a solution for #40. In my opinion, we should not validate the metric before we pass it into the storage if someone uses the storage implementations without using our Collectors. Having validation methods on the other hand makes it easier for users to pass correct metric names & label keys.

Fixes #40