Closed Bug 1903391 Opened 3 months ago Closed 3 months ago

Send From- and To-Language Changes to SelectTranslationsPanel Telemetry

Categories

(Firefox :: Translations, task, P3)

Desktop
All
task

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox128 --- verified
firefox129 --- verified

People

(Reporter: nordzilla, Assigned: nordzilla)

References

Details

Attachments

(4 files)

Description

While our flow-id telemetry can technically tell when a language changed based on multiple translations within the same flow, it will add extra cost on the data side to do these calculations.

It would be much better to add an event for when the language changes, that way we can query this characteristic much more straightforwardly.


Steps to implement

  • Add a SelectTranslationsPanel telemetry event for change_from_language.
  • Add a SelectTranslationsPanel telemetry event for change_to_language.

Tests to implement

  • Ensure that these events have coverage in SelectTranslationsPanel telemetry tests.
Summary: Send From- and To- Language Changes to SelectTranslationsPanel Telemetry → Send From- and To-Language Changes to SelectTranslationsPanel Telemetry

Adds the ability for the SelectTranslationsPanel to send
telemetry events when the from-language or the to-language
is changed in the panel such that a new translation is triggered.

Cleans up the definitions of the language extra_key values
throughout Translations Telemetry to use references for all
of the language keys that have the exact same definition.

Depends on D214159

Attachment #9408250 - Attachment description: WIP: Bug 1903391 - Send from- and to-language changes to telemetry r=#translations-reviewers! → Bug 1903391 - Send from- and to-language changes to telemetry r=#translations-reviewers!
Attachment #9408258 - Attachment description: WIP: Bug 1903391 - Clean up language extra_key definitions r=#translations-reviewers! → Bug 1903391 - Clean up language extra_key definitions r=#translations-reviewers!
Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/466a6c137ae2 Send from- and to-language changes to telemetry r=translations-reviewers,gregtatum https://hg.mozilla.org/integration/autoland/rev/fe0f6d8da1a1 Clean up language extra_key definitions r=translations-reviewers,gregtatum

Adds the ability for the SelectTranslationsPanel to send
telemetry events when the from-language or the to-language
is changed in the panel such that a new translation is triggered.

Original Revision: https://phabricator.services.mozilla.com/D214159

Attachment #9408309 - Flags: approval-mozilla-beta?

Cleans up the definitions of the language extra_key values
throughout Translations Telemetry to use references for all
of the language keys that have the exact same definition.

Original Revision: https://phabricator.services.mozilla.com/D214163

Attachment #9408310 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: This patch stack contains a few more telemetry events that I think will be helpful for monitoring the Select Translations release
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: Set the pref toolkit.telemetry.translations.logLevel to Debug, then filter the browser console by TranslationsTelemetry, then test relevant events when using the panel
  • Risk associated with taking this patch: Low risk
  • Explanation of risk level: The telemetry is covered in automation and will be covered by QA
  • String changes made/needed: None
  • Is Android affected?: no
Flags: in-testsuite+
Attachment #9408309 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9408310 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Regressions: 1903838
QA Whiteboard: [qa-triaged]

I can confirm that a telemetry event is displayed in the Browser Console when the language is changed in Nightly v129.0a1 and beta v128.0b5.

  • When changing the target language:
    TranslationsTelemetry: flowId[4c7d2]: onChangeToLanguage > Object { langTag: "bg" }
    And then the normal onTranslate event is displayed with the same flowId.

  • When changing the source language:
    TranslationsTelemetry: flowId[d0296]: onChangeFromLanguage
    Object { previousLangTag: "de", currentLangTag: "it", docLangTag: "de" }

It would appear that the events differ from one another:

  • onChangeToLanguage only shows the newly chosen target language;
  • onChangeFromLanguage shows the previous origin language, the currently chosen origin language and the document's language.

Was this difference between the events intended? Will these events be valid to use for queries about language changes? Thanks!

Flags: needinfo?(enordin)

Was this difference between the events intended?

Yes, this difference is intentional.

If the user changes the target language, they may just want to see a different translation. But if the user changes the source language, that is an indicator that we have incorrectly detected the language, so it is very useful in this case to know 1) The determined document language, 2) The previous from-language value that was detected, and 3) the newly chosen from-language value.

Will these events be valid to use for queries about language changes? Thanks!

I'm not sure I understand this question, but I will be querying these values in our telemetry dashboards to try to determine which languages are most often identified incorrectly.

Flags: needinfo?(enordin) → needinfo?(dbodea)

Sorry about the poor choice of words. I wanted to make sure that the purpose of these implementations can be achieved. Thank you for the confirmation. Because the events are recorded as it was intended, I consider this implementation complete.

Status: RESOLVED → VERIFIED
Flags: needinfo?(dbodea)
OS: Unspecified → All
Hardware: Unspecified → Desktop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: