Skip to content
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

feat: Add additional metrics for message tracking [CONSVC-1660] #330

Merged
merged 19 commits into from
Jan 20, 2023

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented Sep 1, 2022

  • notification.message.expired -- In flight message has no TTL, endpoint is unavailable.
  • notification.message.stored -- message stored for later transmission
  • notification.message.retrieved -- message extracted from storage
  • ua.notification.sent -- sent a notification to the websocket endpoint

Issue: CONSVC-1660

* `notification.message.expired` -- In flight message has no TTL, endpoint is unavailable.
* `notification.message.stored` -- message stored for later transmission
* `notification.message.retrieved` -- message extracted from storage
* `ua.notification.sent` -- sent a notification to the websocket endpoint

Issue: CONSVC-1660
@jrconlin jrconlin requested review from pjenvey, taddes and a team September 1, 2022 15:51
autoendpoint/src/routers/webpush.rs Outdated Show resolved Hide resolved
autopush-common/src/db/mod.rs Outdated Show resolved Hide resolved
metrics
.incr_with_tags("ua.notification.sent")
.with_tag("source", source)
.send();
Copy link
Member

Choose a reason for hiding this comment

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

A thought: we could kill the ua.notification.topic above for a topic tag here like the other new metrics are doing

@jrconlin jrconlin requested a review from pjenvey November 14, 2022 19:18
* Add metrics to track delivery to OS platforms
* refactored UA parse to be a struct
* some modern clippy cleanup
autoendpoint/src/db/client.rs Outdated Show resolved Hide resolved
autoendpoint/src/db/client.rs Outdated Show resolved Hide resolved
autopush-common/src/db/mod.rs Outdated Show resolved Hide resolved
autopush-common/src/db/mod.rs Outdated Show resolved Hide resolved
autopush-common/src/db/mod.rs Outdated Show resolved Hide resolved
autopush-common/src/db/mod.rs Outdated Show resolved Hide resolved
autoendpoint/src/routers/webpush.rs Outdated Show resolved Hide resolved
@jrconlin jrconlin requested a review from pjenvey January 17, 2023 21:37
@@ -600,36 +603,37 @@ where
}
let now = ms_since_epoch();
let elapsed = (now - webpush.connected_at) / 1_000;
let (ua_result, metrics_os, metrics_browser) = parse_user_agent(&user_agent);
let ua_info = UserAgentInfo::from(user_agent.as_ref());
Copy link
Member

Choose a reason for hiding this comment

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

Sorry one last thing, you shouldn't need to parse it again:

Suggested change
let ua_info = UserAgentInfo::from(user_agent.as_ref());
let ua_info = webpush.ua_info.clone();

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I realized that we don't need to pass the user_agent string anymore, so that's also been removed.

@jrconlin jrconlin requested a review from pjenvey January 18, 2023 17:21
pjenvey
pjenvey previously approved these changes Jan 18, 2023
@jrconlin jrconlin merged commit 65ac1a3 into master Jan 20, 2023
@jrconlin jrconlin deleted the feat/1660-metrics branch January 20, 2023 00:11
@jrconlin jrconlin mentioned this pull request Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants