Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable reporting via meta tag (or otherwise via JS)? #28

Closed
RByers opened this issue Feb 1, 2017 · 12 comments
Closed

Enable reporting via meta tag (or otherwise via JS)? #28

RByers opened this issue Feb 1, 2017 · 12 comments
Labels
report-delivery Covers the core delivery of reports via HTTP

Comments

@RByers
Copy link
Collaborator

RByers commented Feb 1, 2017

The spec doesn't say anything about <meta http-equiv=report-to> tags. Should they be supported? In particular, can reporting be enabled/disabled at any point during the page lifetime?

@nicjansma points out that it can be very difficult for RUM providers to get customers to change request headers, while running a bit of JavaScript to enable reporting is no big deal.

So should there be some way to enable reporting from JavaScript?

@patrickkettner
Copy link
Collaborator

👍 to non header based method, how much of an issue is it if a random actor inserts these into the dom without permission?

@igrigorik
Copy link
Member

Trying to find old thread(s) on this... but not having much luck at the moment.

We did discuss this before though and the decision at the time was "no", because: we don't want arbitrary JS to modify reporting policies on behalf of the origin -- e.g. third party script disabling reporting of security violations (CSP, or some such); enabling <meta> but disabling JS modifications opens another large can of worms, etc. In other words, the SOASTA use case was an explicit "no".

@RByers
Copy link
Collaborator Author

RByers commented Feb 2, 2017

Interesting. I can see that that makes sense for CSP, but is perhaps the wrong tradeoff for something like deprecation warnings? Could we get the best of both worlds by allowing policies to be extended via meta but not modified/removed?

@igrigorik
Copy link
Member

Well, stepping back, is modifying reporting policies even the right primitive? For deprecations, perhaps we ought to expose those directly to javascript, such that tools can pick them up and beacon them directly? If the developer also sets a reporting policy.. then we'd ping them there as well.

@RByers
Copy link
Collaborator Author

RByers commented Feb 3, 2017

Yeah I suppose we could just have two completely independent mechanisms the way CSP does (#29). Not all report types would necessarily have an event (eg. doesn't make sense for crash reports), but by convention many could. @patrickkettner @mikewest thoughts?

@igrigorik
Copy link
Member

I don't think we have to expose every report via JS... navigation errors, crashes, etc, are all good examples where the report doesn't have a context to deliver to, and yet is often still time sensitive. Where it makes sense, and it is safe to do so, we can expose JS events and give developers an option to route those via reporting API; for some it'll be reporting API only.

@RByers
Copy link
Collaborator Author

RByers commented Feb 6, 2017

Yep that makes sense to me.

@patrickkettner
Copy link
Collaborator

re: reports that happen contexts, could these be handled/modified via service worker (ie expose these events for any context that is running on the "correct" domain)? I would really prefer for any report to be in some way modifiable from JS because of the vast number of ways folks track sessions/users/A-B tests across. Most crashes i've dealt with in the wild is the result some combination of these variables that have to be traced back. Giving a straight forward way to tie these front end variables back on your backend would be a huge win for devs

@RByers
Copy link
Collaborator Author

RByers commented Mar 28, 2017

Facebook folks (@n8schloss I believe) also said they'd like some way to add their own data to reports. But IIRC they said that it wasn't really a big deal because they already have their own metrics pipeline and server-side data aggregation, so they can always just use a unique reporting endpoint per page load and then correlate all the data on the server.

@igrigorik
Copy link
Member

Facebook folks (@n8schloss I believe) also said they'd like some way to add their own data to reports.

My two cents: I think this should be explicitly out of scope. We are not trying to build a new "send an arbitrary request API", there are plenty of great options for that already. The value of this API is in exposing a common mechanism for UA-initiated reports that have well defined structure that everyone can parse and knows what to expect.

But IIRC they said that it wasn't really a big deal because they already have their own metrics pipeline and server-side data aggregation, so they can always just use a unique reporting endpoint per page load and then correlate all the data on the server.

Use cookies?

@juliatuttle
Copy link
Contributor

juliatuttle commented Mar 28, 2017 via email

@dcreager dcreager added the report-delivery Covers the core delivery of reports via HTTP label May 22, 2018
@dcreager
Copy link
Member

I think we can close this, because all of the points are being discussed in other issues:

some way to add their own data to reports

#61, #85

Not all report types would necessarily have an event

Different report types define whether they're observable from JS or not

ought to expose those directly to javascript, such that tools can pick them up and beacon them directly

ReportingObserver covers this, I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
report-delivery Covers the core delivery of reports via HTTP
Projects
None yet
Development

No branches or pull requests

5 participants