Skip to content

update explainer with an example of how to add metadata to the HTTP based reporting #61

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions EXPLAINER.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ Each report has:
- `url`: the URL of the page which triggered the report.
- `body`: the contents of the report as defined by the `type`.

### Custom metdata ###

A developer could want to attach some sort of metadata to an individual request in order to better understand the state of application (e.g. version of their app, a/b bucket, etc). This can be accomplished by encoding any relevant information into a query string for the `Report-To` `url` field.

```http
Report-To: { "url": "https://example.com/reports?buildId=6e5x7crtyuvi&segment=united%20states", "max-age": 10886400 }
```

## Basic report formats ##
A number of basic report types are defined which are always enabled (and sent to the default reporting [group](http://wicg.github.io/reporting/#id-member)).

Expand Down