Page MenuHomePhabricator

Add monitoring for parse requests in Attribution API
Closed, ResolvedPublic3 Estimated Story Points

Description

Following the work on T418499: Attribution API MVP: Provide initial-pass base reference count we've implemented a basic count for references in articles requested through the Attribution API based on their HTML. We're requesting HTML from Parser cache or FlaggedRevs cache (see T421011: Implement support for FlaggedRevs in citation count for Attribution API).

Cache misses behavior is different to both of those cases:

  • Using parser cache, a cache miss would trigger a parsing operation and eventually return the HTML.
  • Using FlaggedRevs a cache miss will *not* trigger a parsing operation and there's a fallback for "no available answer".

This ticket aims to add monitoring and observability to this operations so we can continue to validate and monitor:

  • How many cache misses we have in either cases
  • Specifically how many cache misses we have that result in parsing action (which is expensive)
  • How many pages requested from the Attribution API utilize FlaggedRevs
  • How many of those pages have a FlaggedRevs cache-miss

Acceptance criteria

  • [X ] Add monitoring data for the cases above.
  • Add grafana dashboard --> Determine if new metrics require us to create a new dashboard, or if we can include these metrics in the new "per module" view.

Event Timeline

HCoplin-WMF triaged this task as Medium priority.Apr 7 2026, 3:35 PM
  • Some of what's listed here might already been done.
  • This is about putting prometheus calls inside the if statements..it's very specific to the listed stuff e.g how many times do we not get the data.
  • We want to see the shape of data - how many times do we have cache misses

Change #1275436 had a related patch set uploaded (by Pmiazga; author: Pmiazga):

[mediawiki/extensions/WikimediaCustomizations@master] Attribution: Add monitoring for reference count retrieval

https://gerrit.wikimedia.org/r/1275436

HCoplin-WMF set the point value for this task to 3.Thu, Apr 23, 3:47 PM
aaron changed the task status from Open to In Progress.Wed, Apr 29, 3:28 PM

Change #1275436 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCustomizations@master] Attribution: Add monitoring for reference count retrieval

https://gerrit.wikimedia.org/r/1275436

pmiazga updated the task description. (Show Details)

Marking as resolved as part of sprint close out.