Closed Bug 1065496 Opened 10 years ago Closed 7 years ago

Search activity telemetry event counts seem low

Categories

(Firefox for Android Graveyard :: Search Activity, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Margaret, Unassigned)

References

Details

I'm worried that we're not actually properly recording the events from our probes, since there are waaay fewer search activity events than other UI events in Nightly.

rnewman, do you know what could be going wrong here?
Flags: needinfo?(rnewman)
A few things.

If Gecko never starts before our app is killed, telemetry events that were recorded from the search activity will be dropped on the floor.

If it does start, and for some reason our assumption about queuing events is wrong, we could drop events on the floor.

(We're assuming that if you call Telemetry.*, it'll queue events to be sent to Gecko when the Gecko thread finally starts.)

A low count sounds a bit like we're only recording searches when Nightly was already running, which often won't be the case.
Flags: needinfo?(rnewman)
(In reply to Richard Newman [:rnewman] from comment #1)
> A few things.
> 
> If Gecko never starts before our app is killed, telemetry events that were
> recorded from the search activity will be dropped on the floor.
> 
> If it does start, and for some reason our assumption about queuing events is
> wrong, we could drop events on the floor.
> 
> (We're assuming that if you call Telemetry.*, it'll queue events to be sent
> to Gecko when the Gecko thread finally starts.)

This is what the code claims to do, btw. Telemetry calls:

        GeckoAppShell.sendEventToGecko(geckoEvent);

which is:

    public static void sendEventToGecko(GeckoEvent e) {
        if (e == null) {
            throw new IllegalArgumentException("e cannot be null.");
        }

        if (GeckoThread.checkLaunchState(GeckoThread.LaunchState.GeckoRunning)) {
            notifyGeckoOfEvent(e);
            // Gecko will copy the event data into a normal C++ object. We can recycle the event now.
            e.recycle();
            return;
        }

        // Throws if unable to add the event due to capacity restrictions.
        PENDING_EVENTS.add(e);
    }

    static void sendPendingEventsToGecko() {
        try {
            while (!PENDING_EVENTS.isEmpty()) {
                final GeckoEvent e = PENDING_EVENTS.poll();
                notifyGeckoOfEvent(e);
            }
        } catch (NoSuchElementException e) {}
    }


That last method is called when we get Gecko:Ready in GeckoThread.
This is an ex-Search Activity now (bug 1221344).
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.