Closed gquintard closed 1 year ago
Could you give some details why you needed this change. It looks fine and I get it from the test cases, but I would just like to see real world scrape that outputs something we trip on, thanks.
we got hit by this in the enterprise version because one of the vmods create counters containing a #
. We have since then changed the vmod to avoid the issue, but since counter can be created by any vmod (e.g. https://github.com/xcir/libvmod-xcounter), it seems smarter to protect the exporter rather than to ask the vmod writer to watch their steps
The example is Jun 28 08:17:32 name.84.example.net prometheus_varnish_exporter[29701]: panic: "varnish_main_accg_detailed_http_host_docker-repo_example_com_backend_304_count" is not a valid metric name
timing this one out
New varnish versions allows vmods to create custom counters and it's mandatory to normalize their names to avoid scaring the scraper.
This commit doesn't prevent collisions but there's only so much we can do.