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(opapi): generate better error IDs #81

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

AbrahamLopez10
Copy link
Member

@AbrahamLopez10 AbrahamLopez10 commented Dec 1, 2023

This PR makes the following improvements for the error IDs we generate:

  • The embedded timestamp is now in YYYYMMDDHHMMSS format (UTC time) instead of a Unix epoch timestamp. This is safe to do as a 32-bit crypto-random suffix is added to the error ID which will still provide sufficient protection against error ID collisions on the same second.
  • If the error occurs in a browser environment, the prefix for the error ID will be err_bwsr instead of err, so we can easily identify errors that happened in the user's browser, so we can look them up in Sentry instead of Grafana.

@AbrahamLopez10 AbrahamLopez10 merged commit 76bb458 into master Dec 4, 2023
1 check passed
@AbrahamLopez10 AbrahamLopez10 deleted the abe-better-error-ids branch December 4, 2023 17:40
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