Closed Bug 1595873 Opened 6 years ago Closed 6 years ago

Allow calling setExperimentActive prior to Glean initialization

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdroettboom, Assigned: Dexter)

Details

(Whiteboard: [telemetry:glean-rs:m11][glean-22.0.0])

Attachments

(1 file)

In Kotlin, Glean.setExperimentActive is a no-op when Glean hasn't been initialized.

Maybe we could use the same task queueing mechanism we use for metrics recording to make that possible, though?

(In reply to Michael Droettboom [:mdroettboom] from comment #0)

In Kotlin, Glean.setExperimentActive is a no-op when Glean hasn't been initialized.

Maybe we could use the same task queueing mechanism we use for metrics recording to make that possible, though?

Uh-oh, this could be a bug, since the experiment library doesn't check (and that's ok) if Glean is initialized. We could fail to tag.

Travis, do you know if any experiment is currently being run?

Flags: needinfo?(tlong)

Yes, we are currently running an experiment around enhanced tracking protection, slated to end in @ 2 weeks with the launch of FF Preview 3.0

Flags: needinfo?(tlong)

While this is definitely a good idea to fix this, I don't think that this is as likely to occur in real life as I first thought. Glean and Mako both get initialized about the same time, but Mako doesn't enroll (tag) experiments until after it has made a network request, downloaded the list of experiments, and then checked for enrollment. So there's some delay in there that means that (for most applications) that Glean should be initialized before Mako attempts to set the experiment enabled. On startup, with a cached experiment list? Then it might be a little more likely.

All right, thanks! Looks like we should fix this :)

Priority: P3 → P1
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:m11]
Assignee: nobody → alessio.placitelli
Attached file GitHub Pull Request

This was merged and will make it into Glean SDK 22.0.0.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [telemetry:glean-rs:m11] → [telemetry:glean-rs:m11][glean-22.0.0]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: