Page MenuHomePhabricator

MetricsPlatform should parse sample_rate value to number
Closed, ResolvedPublic1 Estimated Story Points

Description

Description

We have recently found that xLab API (specifically /api/v1/instruments) is returning the default sample_rate value as a string in some cases. There is already a task to work on fixing that (T404850: xLab: /api/v1/instruments sometimes is returning sample_rate as a string) and, in addition to that, MetricsPlatform should make sure that the value is in the right format by parsing it explicitly in its side. And in the case the value cannot be parsed, an error will be logged

Acceptance Criteria

  • MetricsPlatform extension, via InstrumentConfigsFetcher, have to parse the sample_rate value and log an error if it cannot do it

Event Timeline

Sfaci renamed this task from MetricsPlatform should parse sample_rate values to numbers to MetricsPlatform should parse sample_rate value to number.Sep 17 2025, 12:34 PM

Change #1183672 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/MetricsPlatform@master] ext.xLab: Add mw.xLab.getInstrument()

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

Change #1183672 merged by jenkins-bot:

[mediawiki/extensions/MetricsPlatform@master] ext.xLab: Add mw.xLab.getInstrument()

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

Change #1190647 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/MetricsPlatform@wmf/1.45.0-wmf.19] ext.xLab: Add mw.xLab.getInstrument()

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

Change #1190648 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/MetricsPlatform@wmf/1.45.0-wmf.20] ext.xLab: Add mw.xLab.getInstrument()

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

Change #1190647 merged by jenkins-bot:

[mediawiki/extensions/MetricsPlatform@wmf/1.45.0-wmf.19] ext.xLab: Add mw.xLab.getInstrument()

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

Mentioned in SAL (#wikimedia-operations) [2025-09-23T14:03:20Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1190667|lib: Update lib/metrics-platform to f1a18553 (T385180)]], [[gerrit:1190679|lib: Update metrics-platform to fc7678c10a1f (T401380)]], [[gerrit:1190647|ext.xLab: Add mw.xLab.getInstrument() (T401380 T404851)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-23T14:09:06Z] <lucaswerkmeister-wmde@deploy1003> phuedx, lucaswerkmeister-wmde: Backport for [[gerrit:1190667|lib: Update lib/metrics-platform to f1a18553 (T385180)]], [[gerrit:1190679|lib: Update metrics-platform to fc7678c10a1f (T401380)]], [[gerrit:1190647|ext.xLab: Add mw.xLab.getInstrument() (T401380 T404851)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-23T14:22:14Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1190667|lib: Update lib/metrics-platform to f1a18553 (T385180)]], [[gerrit:1190679|lib: Update metrics-platform to fc7678c10a1f (T401380)]], [[gerrit:1190647|ext.xLab: Add mw.xLab.getInstrument() (T401380 T404851)]] (duration: 18m 54s)

Change #1190648 merged by jenkins-bot:

[mediawiki/extensions/MetricsPlatform@wmf/1.45.0-wmf.20] ext.xLab: Add mw.xLab.getInstrument()

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

Mentioned in SAL (#wikimedia-operations) [2025-09-26T13:06:39Z] <phuedx@deploy2002> Started scap sync-world: Backport for [[gerrit:1190648|ext.xLab: Add mw.xLab.getInstrument() (T401380 T404851)]], [[gerrit:1191683|lib: Update metrics-platform to fc7678c10a1f (T401380)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-26T13:12:57Z] <phuedx@deploy2002> phuedx: Backport for [[gerrit:1190648|ext.xLab: Add mw.xLab.getInstrument() (T401380 T404851)]], [[gerrit:1191683|lib: Update metrics-platform to fc7678c10a1f (T401380)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-26T13:30:34Z] <phuedx@deploy2002> Finished scap sync-world: Backport for [[gerrit:1190648|ext.xLab: Add mw.xLab.getInstrument() (T401380 T404851)]], [[gerrit:1191683|lib: Update metrics-platform to fc7678c10a1f (T401380)]] (duration: 23m 55s)