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

Thrift metrics: omit status codes for exceptions with a non-int code #892

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

umbrae
Copy link
Contributor

@umbrae umbrae commented Apr 23, 2024

💸 TL;DR

If an exception has a code property that is not actually derived from a baseplate ErrorCode, we currently muddy our prometheus labels with invalid values. This goes a step further to reduce the risk of this occurring by checking for integers, which ErrorCode's thrift definition would require.

📜 Details

Context available in this thread for employees: https://reddit.slack.com/archives/C070ARBL3M2/p1713888048834589

🧪 Testing Steps / Validation

Unit tested

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@umbrae umbrae force-pushed the cd-grpc-thrift-interop-code branch from 20a679d to de6a317 Compare April 23, 2024 19:42
@umbrae umbrae marked this pull request as ready for review April 23, 2024 19:48
@umbrae umbrae requested a review from a team as a code owner April 23, 2024 19:48
@umbrae umbrae requested a review from chriskuehl April 23, 2024 19:48
@trevorriles
Copy link
Contributor

trevorriles commented Apr 23, 2024

@chriskuehl for some context there were the labels we were getting due to the fact that .code() is a method on the grpc object.
image

@chriskuehl chriskuehl merged commit a5abb86 into reddit:develop Apr 23, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants