mozilla / testpilot-metrics

Metrics broker library for Test Pilot experiments. Pings Google Analytics and Mozilla metrics servers
Mozilla Public License 2.0
3 stars 7 forks source link

Use the sdk/request module if we are in an sdk add-on #31

Closed fzzzy closed 7 years ago

fzzzy commented 7 years ago

I haven't tested this yet, but I think it is the right thing. How can I test it? I think min-vid is an sdk add-on that uses testpilot-metrics?

jaredhirsch commented 7 years ago

@fzzzy You can test using the SDK example addon in the examples directory, but this looks correct to me. I'll make you a collaborator, and you can merge after you test it.

As we discussed in #testpilot on IRC, this is good to land, and we can rip out bootstrapped support (and both sendBeacon and fetch, and Services.jsm I think) in a followup PR.

jaredhirsch commented 7 years ago

@fzzzy Ah, looks like the test pilot dev team already has admin rights over this repo.

One thing, you should bump the version number in this PR, and npm publish the updated version after you land the change.

fzzzy commented 7 years ago

Ok, I tested this with the example and it appears to work properly. I was unable to make the "may be causing Firefox to run slowly" error occur with the old version that used the hiddenWindow, but maybe that only happens if CPOWs are used a bunch of times.