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

bug: fix metrics and BrowserID error context #1294

Merged
merged 3 commits into from
Apr 29, 2022
Merged

Conversation

ethowitz
Copy link
Contributor

@ethowitz ethowitz commented Apr 28, 2022

Description

Three small changes:

  • We were extracting the Tokenserver metrics reporter incorrectly, which I noticed when we weren't receiving one of the metrics correctly
  • The Tokenserver statsd label already has tokenserver. in it, so remove that prefix from the places in the code where we emit metrics
  • Add context to unrecognized BrowserID verification errors that have a reason message

@ethowitz ethowitz requested a review from a team April 28, 2022 21:32
@@ -35,7 +34,7 @@ pub struct TokenserverResult {
pub async fn get_tokenserver_result(
req: TokenserverRequest,
db: Box<dyn Db>,
mut metrics: Metrics,
TokenserverMetrics(mut metrics): TokenserverMetrics,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Recently learned you could destructure in function arguments 🦀

Copy link
Member

Choose a reason for hiding this comment

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

TIL. neat!

@ethowitz ethowitz changed the title bug: fix metrics extractor and BrowserID error context bug: fix metrics and BrowserID error context Apr 28, 2022
@@ -35,7 +34,7 @@ pub struct TokenserverResult {
pub async fn get_tokenserver_result(
req: TokenserverRequest,
db: Box<dyn Db>,
mut metrics: Metrics,
TokenserverMetrics(mut metrics): TokenserverMetrics,
Copy link
Member

Choose a reason for hiding this comment

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

TIL. neat!

@ethowitz ethowitz merged commit a086a11 into master Apr 29, 2022
@ethowitz ethowitz deleted the bug/tokenserver-fixes branch April 29, 2022 14:14
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