moonchen commented on PR #13754: URL: https://github.com/apache/trafficserver/pull/13754#issuecomment-6505718851
Rebased onto master (only `upgrading.en.rst` needed merging) and made a few more correctness fixes on top of the approved revision. Re-requesting review for the delta. - Type rules: `PrometheusRules::translate` stripped a label value from the name before matching the type rules by searching for the value, which could hit an earlier, unrelated copy — e.g. an `origin` label value `ur` matched the `ur` inside `current`, so `current_connection` lost its type-rule match and the sample was typed a counter instead of a gauge. It now erases each captured span by its offset. A unit case covers the collision. - `records[]` and unlisted metrics: a full scrape skips a metric that ATS has unlisted (for example a per-server connection metric after a mode change), but the by-name path did not, so `records[]` could serve a metric the full output omits. `record_exists()` and `read_record()` now check `ts::Metrics::listed()`, so the two agree. Covered by a test that unlists a metric and checks `records[]` drops it. - String metrics by name: a `records[]` request for a string metric such as `proxy.process.version.server.short` walked every record on every request, because the plugin could not read it by name. It now reads string metrics from `ts::Metrics::StaticString`, so a request walks only when it first names a record the plugin has not seen. The docs and the comment match. - Rules file errors: a bad scalar for `help`, `rules.labels.<name>` or `limits.max_series` returned a raw yaml-cpp "bad conversion" message with no key. It now names the setting. A repeated key in a map (for example two `rules:` keys) now fails to load rather than silently using the first. - Tests and docs: the compression test again asserts no `ERROR:`, `FATAL:` or unrecognized-value line after shutdown; the upgrade note gives both `--max-age-ms` defaults (0 for the global plugin, 1000 for a remap rule). - Spelled out the concrete types for several `auto` locals where the type was not on the line. Each change is in the commit it belongs to. -- 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]
