Skip to content

Commit

Permalink
Do not add a dummy metric to the deletion-request ping anymore
Browse files Browse the repository at this point in the history
This for now also removed the auto-generated documentation for the ping.
That's a bug in the glean_parser and will be fixed later.
  • Loading branch information
badboy committed Nov 28, 2019
1 parent 3a72ce3 commit f359ef5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 42 deletions.
10 changes: 0 additions & 10 deletions docs/user/collected-metrics/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Sorry about that.

- [all_pings](#all_pings)
- [baseline](#baseline)
- [deletion_request](#deletion_request)
- [metrics](#metrics)


Expand All @@ -35,15 +34,6 @@ The following metrics are added to the ping:
| glean.baseline.locale |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The locale of the application (e.g. "es-ES"). |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1512938#c3)||never |
| glean.validation.metrics_ping_count |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |The number of metrics pings sent during the lifetime of this baseline ping. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1597980#c3)||2019-12-20 |

## deletion_request
This ping is submitted when a user opts out of sending technical and interaction data to Mozilla.

The following metrics are added to the ping:

| Name | Type | Description | Data reviews | Extras | Expiration |
| --- | --- | --- | --- | --- | --- |
| glean.deletion_request.optout |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Signals that the user opted out of sending technical and interaction data. |[1](https://bugzilla.mozilla.org/1587095#c3)||never |

## metrics
This is a built-in ping that is assembled out of the box by the Glean SDK.
See the Glean SDK documentation for the [`metrics` ping](https://mozilla.github.io/glean/book/user/pings/metrics.html).
Expand Down
18 changes: 0 additions & 18 deletions glean-core/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,21 +244,3 @@ glean.error:
- all_pings
no_lint:
- COMMON_PREFIX

glean.deletion_request:
optout:
type: boolean
description:
Signals that the user opted out of sending technical and interaction data.
This will always be true and is currently a workaround
until Glean allows to send empty pings
(https://bugzilla.mozilla.org/show_bug.cgi?id=1599422).
bugs:
- https://bugzilla.mozilla.org/1587095
data_reviews:
- https://bugzilla.mozilla.org/1587095#c3
notification_emails:
- [email protected]
expires: never
send_in_pings:
- deletion_request
1 change: 1 addition & 0 deletions glean-core/pings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ deletion_request:
This ping is submitted when a user opts out of
sending technical and interaction data to Mozilla.
include_client_id: true
send_if_empty: true
bugs:
- https://bugzilla.mozilla.org/1587095
data_reviews:
Expand Down
8 changes: 4 additions & 4 deletions glean-core/src/internal_pings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pub struct InternalPings {
impl InternalPings {
pub fn new() -> InternalPings {
InternalPings {
baseline: PingType::new("baseline", true),
metrics: PingType::new("metrics", true),
events: PingType::new("events", true),
deletion_request: PingType::new("deletion_request", true),
baseline: PingType::new("baseline", true, false),
metrics: PingType::new("metrics", true, false),
events: PingType::new("events", true, false),
deletion_request: PingType::new("deletion_request", true, true),
}
}
}
10 changes: 0 additions & 10 deletions glean-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,6 @@ impl Glean {

// When upload is disabled, send a deletion-request ping
if !flag {
// Add a single data point to ensure ping is non-empty
let metric = metrics::BooleanMetric::new(CommonMetricData {
name: "optout".into(),
category: "glean.deletion_request".into(),
send_in_pings: vec!["deletion_request".into()],
disabled: false,
lifetime: Lifetime::Ping,
..Default::default()
});
metric.set(self, true);
if let Err(err) = self.internal_pings.deletion_request.send(self) {
log::error!("Failed to send deletion-request ping on optout: {}", err);
}
Expand Down

0 comments on commit f359ef5

Please sign in to comment.