Updating registered telemetry events in an add-on during a single Firefox session

Georg Fritzsche gfritzsche at mozilla.com
Mon Oct 16 11:00:21 UTC 2017


Right now there is no direct, better way to do this, this is an oversight
in the API.
I filed bug 1408975 <https://bugzilla.mozilla.org/show_bug.cgi?id=1408975>
on this.

Georg


On Sat, Oct 14, 2017 at 1:52 AM, Richard Newman <rnewman at mozilla.com> wrote:

> This capability was added pretty recently:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1302681
>
> I don't see a way to unregister through this API. Naïvely I would expect
> re-registering the same events from the same add-on to be a no-op, so
> perhaps that's two bugs for the Telemetry component to tackle, and one of
> them might be upliftable.
>
> Georg is the person to ask about this, I think; adding him to the To line
> to make sure he sees this!
>
> On Fri, Oct 13, 2017 at 1:37 PM, Jim Porter <jporter at mozilla.com> wrote:
>
>> I'm one of the developers on Lockbox[1], an embedded WebExtension that
>> uses XPCOM to handle telemetry. I've run into an issue where updating our
>> add-on makes the telemetry API unhappy because we're re-registering events
>> with the same category name. I'd like to re-run
>> `nsITelemetry.registerEvents` in case we've added something to our
>> telemetry. Is there a way to unregister events during the add-on's
>> shutdown? (Currently, we're running `registerEvents` in our bootstrap.js's
>> `startup` function[2].)
>>
>> I have a workaround in progress that appends a version to our main
>> category name (in this case "lockboxv0") so that we can just increment the
>> version anytime we change the events we want to record. Is there a better
>> way?
>>
>> - Jim
>>
>> [1] https://github.com/mozilla-lockbox/lockbox-extension
>> [2] https://github.com/jimporter/lockbox-extension/blob/master/s
>> rc/bootstrap.js#L12-L22
>> _______________________________________________
>> Fx-data-dev mailing list
>> Fx-data-dev at mozilla.org
>> https://mail.mozilla.org/listinfo/fx-data-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/fx-data-dev/attachments/20171016/c96f851c/attachment.html>


More information about the Fx-data-dev mailing list