Page MenuHomePhabricator

hCaptcha: Log error codes in Prometheus and event logging events
Closed, ResolvedPublic

Description

Summary

hCaptcha's error-callback provides us with an error code https://docs.hcaptcha.com/configuration#error-codes. We should make sure that this error code is included in:

  • Prometheus events, so we can distinguish between error types, for account creations and edits
  • the special_create_account event logging stream, as a distinct event that can be analyzed as part of examining the account creation funnel for a user
  • the visualEditorFeatureUse schema, as a distinct event that can be analyzed as part of examining the editing funnel for a user

Acceptance criteria

  • Prometheus events can be split by error code
  • visualEditorFeatureUse has an event for the hCaptcha error code
  • special_create_account has an event for the hCaptcha error code

Event Timeline

Note, this should be built on top of the code being implemented for T409415: hCaptcha: Track events for edits in Prometheus

hector.arroyo changed the task status from Open to In Progress.Nov 12 2025, 10:18 AM
hector.arroyo claimed this task.

Change #1204611 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/ConfirmEdit@master] WiP Track hCaptcha errors

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

Change #1204614 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/WikimediaEvents@master] WiP Track hCaptcha errors

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

Change #1204611 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] hCaptcha: Track hCaptcha errors

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

Change #1204614 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] hCaptcha: Track hCaptcha errors

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

QA completed, closing this task.