moonchen opened a new pull request, #13754: URL: https://github.com/apache/trafficserver/pull/13754
Lets stats_over_http serve its statistics from a remap rule, and makes its Prometheus output cheap to render and configurable enough to scrape each host directly. A remap rule serves one format, its ACL filters control access, and it answers methods other than GET and HEAD with a 405. The plugin renders on a task thread instead of an event thread, and for the Prometheus formats it translates each metric name once and caches the result, so a scrape only formats the values. A YAML file passed with `--config` sets how metric names become Prometheus families, labels and types, so the output can keep the names and labels that existing dashboards and alerts use. Gauges now print as signed values, where a negative gauge used to appear as a number near 2^64. The existing Prometheus formats fix the names and labels in code, render on an event thread, and translate every name on every scrape. A site that needs other names has to run a separate process that fetches the JSON statistics and translates them, which can cost far more CPU than rendering them once in the process that owns them. Rendering thousands of metrics also holds an event thread for milliseconds, which delays the other requests that thread serves. The first commit is #13753, which fixes a crash in the compressed responses; it should merge first. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
