Page MenuHomePhabricator

ParserCache dashboard should show statistics for FlaggedRevs cache
Closed, ResolvedPublic

Description

Currently, the Grafana dashboard for ParserCache shows the primary and secondary caches, but has no statistics for the separate FlaggedRevs cache of stable page revisions. Behavior of this cache is expected to be quite different than the other two stores.

Statistics are reported to statsd using a distinct key prefix, but I can't tell whether these are simply ignored, or are rolled together with the primary ParserCache stats when calculating this dashboard.

It also seems like it would be useful to allow analytical segmentation by wiki, to diagnose the health of specific configurations. This is another question but I mention here because it's related to the issue of wikis using FlaggedRevs and therefore the ParserCache in different ways.

See also:

Event Timeline

Krinkle triaged this task as Medium priority.

The implementation of FlaggedRevsParserCache is essentially just an alternative instantiation of the core ParserCache service class. It's business logic comes not from overriding how the class works, but from how its methods are invoked and from which hooks.

This means its metrics should come along for free. And (fortunately) not in a way that poisons the core metrics, as the class takes a constructor for the metric namespace.

Thanks for the clues, the metrics were separated out very nicely as you pointed out. I've added a new row to https://grafana.wikimedia.org/d/000000106/parser-cache?orgId=1 called "Stable revision cache effectiveness", and the cache health looks good to me.

@awight Thanks, that looks great. I've made a few tweaks to match some labels to their the service class names exactly, and describe in parenthesis how they are used. This is largely an overdue clean up from previous changes that were already present on the dashboard, but I hope it helps those less familiar with FR to not mistake its use of "stable" as being something more widely applicable than it actually is.

Latest revision cache effectivenessParserCache service reads (latest revision)
Latest revision savingParserCache service writes (latest revision)
Old revision cacheRevisionOutputCache service (old revision, memcached)
Stable revision cache effectivenessFlaggedRevsParserCache service (stable revision on flaggedrevs wikis)
Krinkle reassigned this task from Krinkle to awight.