Integrations | Convex Developer Hub
Introducing the Sentry Integration :sentry: , a new Convex Pro feature! 🔥 in Beta!
Now you can easily configure your Convex deployment to send error messages including stack traces to Sentry.
Read more in the Integrations documentation page: https://docs.convex.dev/production/integrations/
If you have feedback, or if there are other Exception Reporting integrations you'd love to see, let us know!
Integrations | Convex Developer Hub
Integrate Convex with third party services.
9 Replies
What are the criteria for when an error is sent to Sentry? Is it anytime a runtime error is produced in any Convex function, or only actions, or something else?
I recently set this up and upon testing it (at first inadvertently, and then intentionally), with a failing mutation, I saw an error from my Sentry browser client, but not from the Convex integration.
Great question. Glad you're using the integration! Rule of thumb "if it has a stacktrace, it'll show up in sentry"
Any runtime error raised by your code inside a query, mutation, or action, or HTTP action should appear in sentry.
If there's some kind of system error (eg you couldn't connect to Convex, or your deployment was overloaded and couldn't service the request), then it wouldn't necessarily appear in Sentry.
Open to feedback here if it's not serving the need (that's the point of being in beta!!). Open up a #support-community with an example of something you're seeing in the browser client, but not from the sentry integration - and what you'd expect differently.
Hey @nipunn—I'm seeing error reports from Convex in Sentry now (who knows why I wasn't before), but they seem only to contain the error's message. It would be really helpful if they also included:
- The name of the function which produced the error, and
- Some auth information, if present (maybe everything in
UserIdentity
? or at least the tokenIdentifier
and subject
… and email
?)Hi! Sorry I may have missed this message in my notifications! I am sorry!
The user token identifier should be appearing as a user tag.
The function name is a great idea - that sounds super valuable. Let me see what I can do
here's a screenshot from my little chess app on convex - you can see there's a user identifier on there
https://docs.convex.dev/production/integrations/exception-reporting#sentry-notes - token identifier will appear in sentry.
We were a little hesitant to put all the detailed information from the user in sentry by default because it could contain PII. An idea that's on our roadmap (unprioritized) would be to make other fields like email enableable via configuration.
Exception Reporting | Convex Developer Hub
Configure exception reporting integrations for your Convex deployment
No worries @nipunn!
I actually do see the token identifier—I just happened to be looking at the time at an error that was only occurring when (in fact, because) the user was logged out, my mistake!
So then yeah, just the function name would be extremely valuable! 🙂
I see the
func
and func_type
tags in Sentry now, and they're extremely helpful. Thanks @nipunn!!Yep! I added them last week! Sorry - forgot to loop back here and ping you.
You should also see
is_node
tag for distinguishing node actions from Convex runtime actions
Queries should also come with a is_cached
tagAwesome good to know, thank you! It would be cool to add this info to the docs (https://docs.convex.dev/production/integrations/exception-reporting) as well
Exception Reporting | Convex Developer Hub
Configure exception reporting integrations for your Convex deployment