Skip to content
Open
Show file tree
Hide file tree
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
40 changes: 30 additions & 10 deletions json-schemas/src/account-stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,12 @@
"push.notifications.delivered.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of successfully-delivered APNS Live Activity Push notifications."
"description": "Total number of successfully-issued APNS Live Activity broadcasts, the final broadcast sent by an end request included. Each broadcast is a single request to Apple that Apple fans out to every device subscribed to the broadcast channel (Ably has no per-device visibility), so this counts issuance, not deliveries, and is not included in the apns or total aggregates, which count per-device notifications."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not included in the apns or total aggregates, which count per-device notifications

Why make this distinction?

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.

Because I think otherwise we'd make the existing total inaccurate:

  • each time we increment the existing total it means "one device got a push"
  • each time we increment this it means "we sent out a broadcast"

Since the fanout for these broadcast is at the Apple's side and as stated in ADR-159 we don't have visibility into those broadcasts, we can't accurately say how many devices received it, which would be the correct value to increment in the existing total. So I think it makes sense to track how many broadcasts we issued and I think it's a complete different stat.

Wdyt?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

each time we increment the existing total it means "one device got a push"

I think that's one way to interpret it, but "device" is not mentioned in either the stat name or the description, and I think it's actually more confusing that total isn't the total of the individually labelled stats.

If we want "device push" and "broadcast push" to be separated, I think we should make that more explicit (e.g. put the LiveActivity stats under push.broadcasts.xxx), but to be honest I think these legacy stats are already pretty confusing, and so perhaps do what you think is reasonable here and we should do this better in the (as yet unreleased) labelled stats.

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.

"device" is not mentioned in either the stat name or the description

fair, I can adjust the description if you think it's worth it

to be honest I think these legacy stats are already pretty confusing, and so perhaps do what you think is reasonable here and we should do this better in the (as yet unreleased) labelled stats.

yeah I would prefer to not change things again and go "against" the legacy stats structure - do you agree we leave it like this now, which I think works fine even though it might still not be too obvious to the user but I don't think we can do better while adhering to the legacy stats structure - and try to improve later with labelled stats?

},
"push.notifications.delivered.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of successfully-delivered APNS Live Activity push-to-start notifications."
},
"push.notifications.delivered.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1567,7 +1572,12 @@
"push.notifications.refused.retriable.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity Push notifications that Ably attempted to deliver but were refused with a retriable error (so which Ably will attempt to retry)."
"description": "Total number of APNS Live Activity broadcasts that Apple refused with a retriable error (the caller receives the failure synchronously and can retry). Not included in the apns or total aggregates."
},
"push.notifications.refused.retriable.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity push-to-start notifications that Ably attempted to deliver but were refused with a retriable error (so which Ably will attempt to retry)."
},
"push.notifications.refused.retriable.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1607,7 +1617,12 @@
"push.notifications.refused.final.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity Push notifications that Ably attempted to deliver but were refused with a non-retriable error."
"description": "Total number of APNS Live Activity broadcasts that Apple refused with a non-retriable error. Not included in the apns or total aggregates."
},
"push.notifications.refused.final.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity push-to-start notifications that Ably attempted to deliver but were refused with a non-retriable error."
},
"push.notifications.refused.final.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1637,7 +1652,12 @@
"push.notifications.skipped.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity Push notifications that Ably did not attempt to deliver, for example Live Activity push-to-start notifications sent to devices without push-to-start tokens."
"description": "Total number of APNS Live Activity broadcasts that Ably did not attempt to issue. Currently always zero: every accepted broadcast request is issued synchronously."
},
"push.notifications.skipped.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity push-to-start notifications that Ably did not attempt to deliver, for example push-to-start notifications sent to devices without push-to-start tokens."
},
"push.notifications.skipped.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1672,7 +1692,12 @@
"push.notifications.all.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of attempts (whatever the outcome) to deliver APNS Live Activity Push notifications."
"description": "Total number of attempts (whatever the outcome) to issue APNS Live Activity broadcasts. Not included in the apns or total aggregates, which count per-device notifications."
},
"push.notifications.all.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of attempts (whatever the outcome) to deliver APNS Live Activity push-to-start notifications."
},
"push.notifications.all.apnsAlert": {
"type": "number",
Expand All @@ -1694,11 +1719,6 @@
"inclusiveMinimum": 0,
"description": "Total number of direct push publishes (that is, notifications triggered by a request to /push/publish, not a channel message with a push payload)."
},
"push.apnsBroadcasts": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNs Live Activity broadcasts issued. Each broadcast is a single request to Apple that Apple fans out to every device subscribed to the broadcast channel (Ably has no per-device visibility), so this counts issuance, not deliveries. Includes the final broadcast sent by an end request."
},
"peakRates.messages": {
"type": "number",
"inclusiveMinimum": 0,
Expand Down
40 changes: 30 additions & 10 deletions json-schemas/src/app-stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,12 @@
"push.notifications.delivered.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of successfully-delivered APNS Live Activity Push notifications."
"description": "Total number of successfully-issued APNS Live Activity broadcasts, the final broadcast sent by an end request included. Each broadcast is a single request to Apple that Apple fans out to every device subscribed to the broadcast channel (Ably has no per-device visibility), so this counts issuance, not deliveries, and is not included in the apns or total aggregates, which count per-device notifications."
},
"push.notifications.delivered.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of successfully-delivered APNS Live Activity push-to-start notifications."
},
"push.notifications.delivered.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1572,7 +1577,12 @@
"push.notifications.refused.retriable.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity Push notifications that Ably attempted to deliver but were refused with a retriable error (so which Ably will attempt to retry)."
"description": "Total number of APNS Live Activity broadcasts that Apple refused with a retriable error (the caller receives the failure synchronously and can retry). Not included in the apns or total aggregates."
},
"push.notifications.refused.retriable.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity push-to-start notifications that Ably attempted to deliver but were refused with a retriable error (so which Ably will attempt to retry)."
},
"push.notifications.refused.retriable.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1612,7 +1622,12 @@
"push.notifications.refused.final.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity Push notifications that Ably attempted to deliver but were refused with a non-retriable error."
"description": "Total number of APNS Live Activity broadcasts that Apple refused with a non-retriable error. Not included in the apns or total aggregates."
},
"push.notifications.refused.final.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity push-to-start notifications that Ably attempted to deliver but were refused with a non-retriable error."
},
"push.notifications.refused.final.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1642,7 +1657,12 @@
"push.notifications.skipped.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity Push notifications that Ably did not attempt to deliver, for example Live Activity push-to-start notifications sent to devices without push-to-start tokens."
"description": "Total number of APNS Live Activity broadcasts that Ably did not attempt to issue. Currently always zero: every accepted broadcast request is issued synchronously."
},
"push.notifications.skipped.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNS Live Activity push-to-start notifications that Ably did not attempt to deliver, for example push-to-start notifications sent to devices without push-to-start tokens."
},
"push.notifications.skipped.apnsAlert": {
"type": "number",
Expand Down Expand Up @@ -1677,7 +1697,12 @@
"push.notifications.all.apnsLiveActivity": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of attempts (whatever the outcome) to deliver APNS Live Activity Push notifications."
"description": "Total number of attempts (whatever the outcome) to issue APNS Live Activity broadcasts. Not included in the apns or total aggregates, which count per-device notifications."
},
"push.notifications.all.apnsPushToStart": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of attempts (whatever the outcome) to deliver APNS Live Activity push-to-start notifications."
},
"push.notifications.all.apnsAlert": {
"type": "number",
Expand All @@ -1698,11 +1723,6 @@
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of direct push publishes (that is, notifications triggered by a request to /push/publish, not a channel message with a push payload)."
},
"push.apnsBroadcasts": {
"type": "number",
"inclusiveMinimum": 0,
"description": "Total number of APNs Live Activity broadcasts issued. Each broadcast is a single request to Apple that Apple fans out to every device subscribed to the broadcast channel (Ably has no per-device visibility), so this counts issuance, not deliveries. Includes the final broadcast sent by an end request."
}
}
}
Expand Down
Loading