Skip to content

Revise descriptions for ReportingObserver() report types#29475

Merged
chrisdavidmills merged 6 commits into
mdn:mainfrom
chrisdavidmills:crash-reporting-api
Apr 27, 2026
Merged

Revise descriptions for ReportingObserver() report types#29475
chrisdavidmills merged 6 commits into
mdn:mainfrom
chrisdavidmills:crash-reporting-api

Conversation

@chrisdavidmills

@chrisdavidmills chrisdavidmills commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Chrome 145 adds support for the Crash Reporting API; see https://chromestatus.com/feature/6228675846209536.

Most of the BCD for this API has already been added; however, I wanted to add a data point for the crash report type. The data for the different report types is contained under api.ReportingObserver.ReportingObserver.options_parameter.types_property, so I added it under there. This data is also used as the BCD for each report type dictionary; I'll need it when documenting CrashReportBody.

This is a bit weird, as crash reports aren't observed by reporting observers, but I think you can still specify them as a valid report type in the constructor types list.

Test results and supporting details

Related issues

@github-actions github-actions Bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:m [PR only] 25-100 LoC changed labels Apr 14, 2026
@github-actions

github-actions Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

Comment thread api/ReportingObserver.json Outdated
],
"support": {
"chrome": {
"version_added": "145"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit weird, as crash reports aren't observed by reporting observers, but I think you can still specify them as a valid report type in the constructor types list.

If this report is never observed in the only implementing browser, then we should probably mention this in the notes? However, it is also not really clear what support means then if there is no effect?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried adding a note to explain this. Let me know what you think. This is a weird situation, but it is still useful to know that the report type is not observed.

@chrisdavidmills chrisdavidmills requested a review from caugner April 20, 2026 11:18
Comment thread api/ReportingObserver.json Outdated
Comment on lines +180 to +184
"support": {
"chrome": {
"version_added": "145",
"notes": "The `crash` report type can be specified in the `types` array, but crash reports are not observed by reporting observers. They can be sent to reporting endpoints."
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this note can be helpful, but I'm still wondering what "supported" means here versus not supported. Does setting the type to crash in an earlier version have a different behavior, for example throwing an error?

/cc @ddbeck for a 2nd opinion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It basically just means that crash is a recognised type. I've tested it, and unfortunately, it doesn't throw if an unrecognized type is included in the options object.

The main reaosn I'm adding this here is because of this note in the description:

This data is also used as the BCD for each report type dictionary; I'll need it when documenting CrashReportBody.

Because we don't record BCD separately for dictionaries, I need this data point to show BCD in the new dictionary page I'm documenting. This is how it was decided for the reporting dictionaries.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why will you need it when documenting crash report bodies—can you say more about this? If you need a way to show support for receiving crash report bodies, would http.headers.Reporting-Endpoints.crash-reporting suffice (see #29399)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it is for consistency more than anything. This is what we've used to represent the BCD for all the other reporting dictionaries.

Also, there is a bit of a version mismatch. The data you've added says Chrome 139, but the bits I've just bene documenting say Chrome 145. https://developer.mozilla.org/en-US/docs/Web/API/CrashReportContext#browser_compatibility, for example.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say it's inconsistent to say that ReportingObserver() has anything to do with crash reporting. 🤷

As for the header data, there's no inconsistency but there is a part missing:

  • CrashReportContext is part of the crash report context key-value API. It's new in Chrome 145.
  • http.headers.Reporting-Endpoints.crash-reporting is the named endpoint for crash reports. It's new in Chrome 139.
  • Here's the missing part: Since Chrome 73, crash reports go to the default crash reporting endpoint (citation). We could have some keys like http.headers.Reporting-Endpoints.default, http.headers.Reporting-Endpoints.default.receives_crash_type, and http.headers.Reporting-Endpoints.default.receives_deprecation_type to track this.

On the last point, would that solve the problem for crash report bodies?

See also mdn/content#43688 and cc: @hamishwillee.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say it's inconsistent to say that ReportingObserver() has anything to do with crash reporting. 🤷

Yeah, I guess it is. I was just trying to follow the pattern laid out for the other reporting body dictionaries, but I see your point.

As for the header data, there's no inconsistency but there is a part missing:

* `CrashReportContext` is part of the crash report context key-value API. It's new in Chrome 145.

* `http.headers.Reporting-Endpoints.crash-reporting` is the named endpoint for crash reports. It's new in Chrome 139.

Hrm, neither of those sounds like the data that should be used to represent CrashReportBody.

* Here's the missing part: Since Chrome 73, crash reports go to the `default` crash reporting endpoint ([citation](https://chromestatus.com/feature/6683949661159424)). We could have some keys like `http.headers.Reporting-Endpoints.default`, `http.headers.Reporting-Endpoints.default.receives_crash_type`, and `http.headers.Reporting-Endpoints.default.receives_deprecation_type` to track this.

On the last point, would that solve the problem for crash report bodies?

This sounds more like the data we want to use for CrashReportBody. Shall I remove the crash data point from this PR (I think the type fix on line 107 could still do with fixing), and open a new PR to add the data you're proposing here?

See also mdn/content#43688 and cc: @hamishwillee.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I remove the crash data point from this PR (I think the type fix on line 107 could still do with fixing), and open a new PR to add the data you're proposing here?

That sounds good to me. Feel free to tag me for review on it when it opens.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me. Feel free to tag me for review on it when it opens.

OK, I'll get on it. Thanks for the help in resolving this, @ddbeck.

@github-actions github-actions Bot added size:s [PR only] 7-24 LoC changed and removed size:m [PR only] 25-100 LoC changed labels Apr 24, 2026
@chrisdavidmills chrisdavidmills requested a review from ddbeck April 24, 2026 10:49
@ddbeck

ddbeck commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Approved, but before merging I'd recommend renaming this PR to something like "Revise descriptions for ReportingObserver() report types"

@chrisdavidmills chrisdavidmills changed the title Chrome 145 Crashing reporting, crash report type Revise descriptions for ReportingObserver() report types Apr 27, 2026
@chrisdavidmills

Copy link
Copy Markdown
Contributor Author

Approved, but before merging I'd recommend renaming this PR to something like "Revise descriptions for ReportingObserver() report types"

Done. Thanks, @ddbeck!

@chrisdavidmills chrisdavidmills merged commit 7d2347f into mdn:main Apr 27, 2026
9 checks passed
@chrisdavidmills chrisdavidmills deleted the crash-reporting-api branch April 27, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:s [PR only] 7-24 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants