Page MenuHomePhabricator

PHP Warning: Stats: Cannot add labels to a metric containing samples for 'update_mentee_data_seconds'
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   PHP Warning: Stats: Cannot add labels to a metric containing samples for 'update_mentee_data_seconds'
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.11/includes/libs/Stats/Metrics/MetricTrait.php(95)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int, array)
#1/srv/mediawiki/php-1.44.0-wmf.11/includes/libs/Stats/Metrics/MetricTrait.php(95)trigger_error(string, int)
#2/srv/mediawiki/php-1.44.0-wmf.11/extensions/GrowthExperiments/maintenance/updateMenteeData.php(177)Wikimedia\Stats\Metrics\TimingMetric->setLabel(string, string)
#3/srv/mediawiki/php-1.44.0-wmf.11/maintenance/includes/MaintenanceRunner.php(703)GrowthExperiments\Maintenance\UpdateMenteeData->execute()
#4/srv/mediawiki/php-1.44.0-wmf.11/maintenance/run.php(51)MediaWiki\Maintenance\MaintenanceRunner->run()
#5/srv/mediawiki/multiversion/MWScript.php(156)require_once(string)
#6{main}
Impact
Notes

A lot of these warnings whenever the script runs. Related T374048

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm_WMF edited projects, added Growth-Team (Current Sprint); removed Growth-Team.

Follow-up to the work from T374048, moving to sprint.

@Cyndymediawiksim, would you be able to take a look at this? FYI to @Sgs.

Urbanecm_WMF added a subscriber: Michael.

I'm also wondering how much related this is to T383208: StatsLib timings MUST be recorded as milliseconds. @Michael @Sgs, do you know?

You added label "section" to the "profiling" (173-177) part, but the label structure and first sample(s) were created at the "total time" part (164-170). Creating new label keys is not allowed when some data is already collected.

Cyndymediawiksim changed the task status from Open to In Progress.Jan 13 2025, 12:34 PM
Cyndymediawiksim claimed this task.
Cyndymediawiksim moved this task from Incoming to Doing on the Growth-Team (Current Sprint) board.

Change #1110766 had a related patch set uploaded (by Cyndywikime; author: Cyndywikime):

[mediawiki/extensions/GrowthExperiments@master] Fix failing UpdateMenteeData.php script

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

Change #1110766 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix failing UpdateMenteeData.php script

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

The error seem to stop completely - the logstash link. The last timestamp - Jan 23, 2025 @ 19:24:31.268