-
Notifications
You must be signed in to change notification settings - Fork 36
How to support "deprecation" and "intervention" use cases #27
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
Comments
/cc @nicjansma @n8schloss :) |
@RByers everything you wrote above sounds reasonable to me, I think we'd be pretty supportive of something like this! |
👍 I like the idea a lot. The Reporting API is only able to send reports to HTTP endpoints specified via the page's HTTP response headers (e.g. As a RUM vendor, it's generally somewhat of a pain (or takes a long time, or is a non-starter) to get things like HTTP headers added to our customer's websites. We can get our third-party script tag on their sites, but that's about it. Along those lines, since our script is already living on our customer's pages, we've recently started collecting JS errors ( One big difference with the Reporting API (as I understand it) is that it's goal is to be able to report when a page can't even load -- whereas deprecations would be the opposite. So I'm not sure if deprecations fit within the Reporting API, unless it could be extended to also report via JS (can I get a |
@nicjansma thanks! Those are problems we've discussed in other reporting scenarios as well - filed #28 and #29 to discuss some ideas. I chatted some more about this with @mikewest and @patrickkettner at BlinkOn. I think we agree that we should start with a "basic reports" explainer (eventually spec) here in the reporting repo that defines the use cases and report formats. @mikewest says we'll probably want to add a note to the main spec saying that some report types can be enabled by default to go to the default group (and it's probably fine if we don't even provide an explicit API for enabling/disabling or setting the reporting group for the basic reports (at least in the initial MVP). |
I've written an initial rough explainer for this (and reporting generally). Thoughts? |
#28 suggests that we should have a completely independent DOM event for deprecation (and probably also intervention) warnings the way CSP does. That seems reasonable to me (eg. a single "UsageWarningEvent" fired at the window). In fact, if we're going to do that anyway, then it's not clear to me how much additional value there is to also having the Reporting API support. I suppose the reporting API is always going to be more reliable, and may be more convenient to enable in some cases. I'd be happy shipping the DOM event first though. Thoughts? |
If we plan exposing a growing number of these, having a common event/mechanism to subscribe from JS would be nice. Maybe that's the connection to Reporting.. or maybe not. I do agree that the background delivery part of the process is not a strict requirement for deprecations and warnings. |
I guess the thing that's really valuable to have common infrastructure for is the background delivery. There are a few properties on Regardless it sounds like we should have some DOM event for deprecation and intervention cases. @patrickkettner, do you agree? If so I'll create a new repo (eg. "API Usage Warnings") and write an explainer for that (and have it hook into reporting the way CSP does). Sound good? |
everything sounds great to me. The only open question in my mind is how we would specify things in
This comes down to what we want the "default" group to be. Considering how hard it is to message deprecations to developers, I would prefer that the simplest settings (i.e. no group specified) include them.
an event unique to each type, or a generic report event? This is just #29, correct? |
Thanks for the cc @patrickkettner. The timing of this is uncanny. I've been working on a separate site/service and one of the features was going to be how to warn site operators about upcoming feature deprecation. The example is usually detecting use of the geolocation API on http and having warned before it broke without warning. This would be a great fit for me on @report-uri and I'd be happy to help how I can. |
@RByers: Over time, I'd be happy to move things off I think I'd actually suggest being even more generic: |
|
@paulmeyer90 has added deprecation and intervention reports to the spec, and Chrome is shipping deprecation reports. Probably all that's left to close out this issue is to get web-platform-tests for deprecation and intervention reports (which has been blocked on some WebDriver work for automation). @paulmeyer90 are there issues / bugs elsewhere tracking that work? |
Uh oh!
There was an error while loading. Please reload this page.
@patrickkettner @igrigorik @mikewest and I have been chatting offline about using the Reporting API to report deprecation warnings and warnings about interventions being hit.
Let's move the discussion here for somewhere public. Presumably this will turn into either a new WICG repo or perhaps just an additional specification inside this repo (or maybe I'm wrong and no knew spec text is required at all?).
Here's a summary of the key questions we've been discussing so far:
Do we need an API for these warnings
It sounded like @patrickkettner was thinking we could get away without any new API surface area. I think we're going to want developers to be able to explicitly specify the reporting group and enable/disabling reporting for deprecations and interventions. But maybe that's not necessary in an MVP?
Can deprecation/intervention reporting be on-by-default
@igrigorik said:
What should the name of the header be to control this
@igrigorik said:
Virtually all Reporting API use cases are "warnings", right? So would this be a catch-all for report types that aren't explicitly configured elsewhere? Should we consider (now or in the future) some ability to filter by "type". Eg.
Warnings: deprecation; report-to=groupname
.Or is it better to just have report-type-specific headers like
Deprecations
andInterventions
?How much of the report format for deprecations and interventions should we specify?
For deprecations I can imagine implementing something like this:
In particular, I assume we'd want a stable (but impl-defined)
id
to enable services to group reports for counting/reporting purposes, and some sort of mechanism for prioritization.@igrigorik suggested a type of simply
warning
. But would something like that be too generic to be useful? All reports are warnings, right? Is the schema forreport
intended to be determined by thetype
? I.e. if we want structured information likeanticipatedRemoval
then we'd want to distinguish deprecations from interventions in thetype
, right?Are there any potential consumers we should engage with on the design?
Google Analytics is an obvious option. @igrigorik are there any folks from any of the RUM vendors who would be useful to bring into this design discussion early?
The text was updated successfully, but these errors were encountered: