Page MenuHomePhabricator

Add namespace cuts for Attribution API montioring
Closed, ResolvedPublic

Description

Description

Technically any page can be requested through the Attribution API. While we assume that the majority of requests will be for articles and media files, tracking additional namespace usage will likely be a strong leading indicator of additional project adoption while also providing insight into unexpected usage for things like talk pages. Additionally, it would be helpful to know when failures are occurring within specific namespaces so that we can take appropriate action. For example, we have an open question about whether users will request media files directly from the article domain, or if they are typically referencing commons directly. To understand this, we need a way to break down and examine the media file namespace.

Conditions of acceptance

  • Add a grafana chart that shows the % distribution of requested namespaces based on total # of requests. Prefer this is a pie chart.
  • Add a namespace filter to the Attribution dashboard --> Determine if this is possible within the breakdown by module view, or if we will need to have a dedicated Attribution API dashboard.
    • When the additional filter is set, all visible charts should update.
  • Add a 'Bad requests per namespace' chart so that we can see if there are proportionally more bad requests for media files vs articles, etc.
  • Add a "latency per namespace" chart so that we can identify differences or bottle necks between content types

Event Timeline

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

[mediawiki/extensions/WikimediaCustomizations@master] Attribution: Track namespace on monitoring metrics

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

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

[mediawiki/extensions/WikimediaCustomizations@master] RestSandbox: Fix @covers annotation in SpecialRestSandboxTest

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

Change #1310671 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCustomizations@master] Attribution: Track namespace on monitoring metrics

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

pmiazga changed the task status from Open to In Progress.Jul 22 2026, 10:56 AM
pmiazga claimed this task.

@HCoplin-WMF I added tracking timings - I wonder if we need everything that's defined here? Right now we have a Pie chart that shows the number of requests per Namespace. If we need, we can easily add the latency graph per namespace too but I'm not sure if this is something we need as we already track all subparts ( ExtMetadata timing, PageVews timing, Reference timing ) so at the end we have a more granular view of what's taking the time - IMHO, we don't need another graph for the entire request.

The second point, which is

add a namespace filter to the Attribution dashboard

This is IMHO a bit overkill, as then to make the filter update all charts would require us to add a namespace label to all metrics we track. I'm not sure if this is something worth doing at this moment. We know that ExtMetadata timing refers only to files, whereas ref counts timing refers only to articles.
I recommend updating the conditions of acceptance and removing some of the points to simplify this board. If we find that we need something, it's easy to add.

I recommend leaving the first point, which is done.
Drop the second, as IMHO it feels a bit overkill at this stage
With the third, I don't understand how I can measure "Bad requests per namespace". What do you mean by that?
And the fourth checkbox - it's not required, as we have a more granular view of what is happening during the request. If we really want, this data is tracked.

Let me call this work done for now, if we need better grafana dashboards we will come back to this topic.