<div dir="ltr"><div>This capability was added pretty recently:</div><div><br></div><div><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1302681">https://bugzilla.mozilla.org/show_bug.cgi?id=1302681</a></div><div><br></div><div>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.<br></div><div><br></div><div>Georg is the person to ask about this, I think; adding him to the To line to make sure he sees this!<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 1:37 PM, Jim Porter <span dir="ltr"><<a href="mailto:jporter@mozilla.com" target="_blank">jporter@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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].)<br>
<br>
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?<br>
<br>
- Jim<br>
<br>
[1] <a href="https://github.com/mozilla-lockbox/lockbox-extension" rel="noreferrer" target="_blank">https://github.com/mozilla-loc<wbr>kbox/lockbox-extension</a><br>
[2] <a href="https://github.com/jimporter/lockbox-extension/blob/master/src/bootstrap.js#L12-L22" rel="noreferrer" target="_blank">https://github.com/jimporter/l<wbr>ockbox-extension/blob/master/s<wbr>rc/bootstrap.js#L12-L22</a><br>
______________________________<wbr>_________________<br>
Fx-data-dev mailing list<br>
<a href="mailto:Fx-data-dev@mozilla.org" target="_blank">Fx-data-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/fx-data-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/listi<wbr>nfo/fx-data-dev</a><br>
</blockquote></div><br></div>