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 sentry to achievements worker #3640

Merged
merged 2 commits into from
Aug 29, 2023
Merged

feat: add sentry to achievements worker #3640

merged 2 commits into from
Aug 29, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Aug 29, 2023

What does this PR do?

🤖 Generated by Copilot at c07ced5

This pull request adds Sentry tracing and error monitoring to the achievements worker, and refactors the handler logic to use the new Achievement class and common utilities. It also updates the environment variables, the package.json script, the wrangler.toml file, and the pnpm-lock.yaml file to support the Sentry integration.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at c07ced5

  • Add and configure Sentry SDK for error and performance monitoring in the achievements worker (link, link, link, link, link, link)
  • Import and use @sentry/tracing module to start and finish transactions and spans for each handler function (link, link, link, link, link, link, link, link, link, link, link, link)
  • Import and use toucan-js module to create a Sentry instance and wrap the fetch event handler (link, link)
  • Import and use @lenster/data/errors and @lenster/lib/response modules to handle errors and responses consistently (link, link)
  • Add a helper function buildRequest to create a WorkerRequest object from the original request, the environment variables, the execution context, and the Sentry instance (link, link)
  • Change the type of the request parameter from Env to WorkerRequest in all handler functions and use the request.env object to access the environment variables (link, link, link, link, link, link, link, link, link)
  • Change the import of itty-router to use named imports instead of default import and add a head handler and a catch-all handler to the router configuration (link, link)
  • Add a message and a version property to the root handler response (link)

Emoji

🐛🚀🧹

@vercel
Copy link

vercel bot commented Aug 29, 2023

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

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview Aug 29, 2023 10:21am
web ✅ Ready (Inspect) Visit Preview Aug 29, 2023 10:21am

@vercel vercel bot temporarily deployed to Preview – web August 29, 2023 10:17 Inactive
@bigint bigint merged commit 4c5044d into main Aug 29, 2023
5 checks passed
@bigint bigint deleted the sentry-achievements branch August 29, 2023 10:18
@vercel vercel bot temporarily deployed to Preview – prerender August 29, 2023 10:21 Inactive
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.

1 participant