Closed Bug 1830209 Opened 1 year ago Closed 1 year ago

Refactor SearchSERPTelemetry ContentHandler.observeActivity

Categories

(Firefox :: Search, task, P2)

task

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: jteow, Assigned: jteow)

References

Details

Attachments

(1 file)

Couple things I could do better here:

  • Improve the documentation of the logic
  • Be more intentional about when we emit warnings: We should only see warnings if we have an event from a SERP, but didn't record the event elsewhere and don't have a type associated with it.
  • Move !info.nonAdsLinkRegexps.some(r => r.test(originURL)) check later in the process: We always need to check if the URL matches a SERP so that we can record the source of a possible impression. In some scenarios, we won't know this information until after a redirect.
  • I structured things the way they were before to separate the algorithmic complexity of finding the type from recording the Glean event for perf measurements, but it made reading the code slightly harder to understand.
Assignee: nobody → jteow
Status: NEW → ASSIGNED
Pushed by jteow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/438845dd89a7
Refactor observeActivity - r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: