Skip to content

Commit

Permalink
Add docs about ping body limits and changelog entry
Browse files Browse the repository at this point in the history
Also...
* Correct data-review link for discarded_exceeding_pings_size
* Add changelog entry about ping tagging for iOS (forgot on previous PR)
  • Loading branch information
brizental committed Jul 28, 2020
1 parent 261f2e5 commit ff3c52c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[Full changelog](https://github.com/mozilla/glean/compare/v31.6.0...main)

* General
* Limit ping request body size to 1MB. ([#1098]((https://github.com/mozilla/glean/pull/1098)))
* iOS
* Implement ping tagging (i.e. the `X-Source-Tags` header) through custom URL ([#1100](https://github.com/mozilla/glean/pull/1100)).
* C#
* Add support for Labeled Strings and Labeled Booleans.
* Add support for the Counter metric type and Labeled Counter.
Expand Down
9 changes: 7 additions & 2 deletions docs/user/pings/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ See [Using the Experiments API](../experiments-api.md) on how to record experime

The pings that the Glean SDK generates are submitted to the Mozilla servers at specific paths, in order to provide additional metadata without the need to unpack the ping payload.

> **Note**: To keep resource usage in check, the Glean SDK allows only up to 10 ping submissions every 60 seconds. There are no exposed methods to change these rate limiting defaults yet, follow [Bug 1647630](https://bugzilla.mozilla.org/show_bug.cgi?id=1647630) for updates.
A typical submission URL looks like

`"<server-address>/submit/<application-id>/<doc-type>/<glean-schema-version>/<document-id>"`
Expand All @@ -94,6 +92,13 @@ where:
- `<glean-schema-version>`: the version of the Glean ping schema;
- `<document-id>`: a unique identifier for this ping.

### Limitations

To keep resource usage in check, the Glean SDK enforces some limitations on the pings it will upload and in the amount of uploads allowed per a given time interval.

- **Rate limiting**: only up to 10 ping submissions every 60 seconds are allowed. There are no exposed methods to change these rate limiting defaults yet, follow [Bug 1647630](https://bugzilla.mozilla.org/show_bug.cgi?id=1647630) for updates.
- **Request body size limiting**: the body of a ping request may have up to 1MB. Pings that exceed this size are discarded and don't get uploaded. Size and number of discarded pings are recorded on the internal Glean metric [`glean.upload.discarded_exceeding_pings_size`](../collected-metrics/metrics.md#metrics-1).

### Submitted headers
A pre-defined set of headers is additionally sent along with the submitted ping:

Expand Down
2 changes: 1 addition & 1 deletion glean-core/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ glean.upload:
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1597761
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1597761#c4
- https://bugzilla.mozilla.org/show_bug.cgi?id=1597761#c10
data_sensitivity:
- technical
notification_emails:
Expand Down

0 comments on commit ff3c52c

Please sign in to comment.