Found while working on {T374048}. It seems the statsd client is checking for all metric names to end with `_total` (see [[ https://gerrit.wikimedia.org/g/mediawiki/extensions/WikimediaEvents/+/45c7c9779a340b31484cf07e35a5199f4495ee5a/modules/ext.wikimediaEvents/statsd.js#114 | source ]]). While that is correct for counter metrics, the [[ https://www.mediawiki.org/wiki/Manual:Stats#Recommendations | recommendations ]] docs state that `_seconds` should be used for timing metrics.
**Steps to replicate the issue** (include links if applicable):
* Make a call to `mw.track` with `stats.` prefix and `_seconds` suffix, eg: `mw.track( 'stats.mediawiki_Component_some_thing_seconds', 123 )`
**What happens?**:
An error is thrown:
```
TypeError: Invalid stat name mediawiki_growth_experiments_navigation_duration_seconds
at formatDogstatsd (statsd.js:115:17)
at statsd.js:151:15
at Object.handler (mediawiki.base.js:416:5)
at fire (jquery.js:3223:31)
at Object.fireWith (jquery.js:3353:7)
at Object.fire (jquery.js:3361:10)
at mw.track (mediawiki.base.js:386:17)
...
```
**What should have happened instead?**:
The track call should succeed