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

refactor: better observability in api routes #18810

Merged
merged 6 commits into from
Jan 22, 2025

Conversation

zomars
Copy link
Member

@zomars zomars commented Jan 22, 2025

What does this PR do?

refs #18784

This pull request includes changes to improve error handling and refactor the Sentry integration in API handlers. The most important changes include moving the Sentry wrapping logic to the defaultResponder function and enhancing error handling for TRPC errors.

Sentry Integration Refactor:

Error Handling Improvements:

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Copy link
Contributor

github-actions bot commented Jan 22, 2025

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

Unknown release type "fefactor" found in pull request title "fefactor: better observability in api routes". 

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 8:29pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 8:29pm

Copy link
Contributor

github-actions bot commented Jan 22, 2025

E2E results are ready!

@zomars zomars marked this pull request as ready for review January 22, 2025 20:06
@graphite-app graphite-app bot requested a review from a team January 22, 2025 20:06
Copy link

graphite-app bot commented Jan 22, 2025

Graphite Automations

"Add foundation team as reviewer" took an action on this PR • (01/22/25)

1 reviewer was added to this PR based on Keith Williams's automation.

@zomars zomars changed the title fefactor: better observability in api routes refactor: better observability in api routes Jan 22, 2025
Copy link
Contributor

@keithwillcode keithwillcode left a comment

Choose a reason for hiding this comment

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

Amazing. Thank you for taking this over @zomars

@zomars zomars enabled auto-merge (squash) January 22, 2025 20:28
@zomars zomars merged commit 1af3caa into main Jan 22, 2025
39 checks passed
@zomars zomars deleted the refactor/better-observability-api-routes branch January 22, 2025 20:52
Copy link
Member Author

@zomars zomars left a comment

Choose a reason for hiding this comment

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

.

emrysal pushed a commit that referenced this pull request Jan 24, 2025
zomars added a commit that referenced this pull request Jan 24, 2025
Copy link

sentry-io bot commented Jan 27, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: Something went wrong! Unable to get transcription access link GET /api/bookings/[id]/transcripts View Issue
  • ‼️ HttpError: Invalid time value GET /api/slots View Issue
  • ‼️ HttpError: responses must not be nullish POST /api/bookings View Issue
  • ‼️ HttpError: Invalid time zone specified: undefined GET /api/slots View Issue
  • ‼️ HttpError: Both Phone and Email are missing DELETE /api/bookings/[id]/cancel View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants