We’ve been using Sentry forever, for all of our projects. They’re the de facto error tracking tool for most of the internet. So, we partnered up with them: Sentry is generously giving each Fly.io organization an auto-provisioned account with a year’s worth of credits on their Team plan.
Aside from setting up account and environment secret, is there any other Sentry features that are integrated in any way? Off the top of my head, thinking about Releases, does fly deploy automatically create a new Release in Sentry?
Automatically adding context to errors like Fly Machine ID or Region might be nice too, but guessing those would need to be done in the app Sentry SDK. Might be a good example snippet in the docs.
Is there any way to tie two different Fly apps to the same Sentry project? To e.g., then use the Sentry Environment tag to differentiate between a staging and production Fly app, rather than having two completely separate Sentry projects?
Can you use the same sentry DSN. Go into a existing app -
fly ssh console -s (lets you select the instance)
Copy and past output. Then in your other app -
fly set secret SENTRY_DSN=<output>
That being said, I don’t know if its a good idea.
In Sentry you specify the language, and with some like Go, you even specify if its net/http or fasthttp framework as a example.
So if your two apps are not the same language, that can cause confusion. Additionally, if you have the same method names, it would be hard to tell the source if both main() as a entry point, and one has a error, which one is it?
Also you loose benefits like release tracking (being added soon) and other features that keeping that apps separate benefit from.
But in theory, sentry only knows the source because it connects via the DSN. Same DSN, should view it as the same source.
But you bring up a EXCELLENT point, because in progress.groups, which is when you define multiple processes in your fly.toml, but they share the same Fly app, and the same Dockerfile, and the same ENV. How does sentry handle process groups, especially when they are different sources?
Right now there’s no way to do this besides what was suggested by @Zane_Milakovic - copy and paste the Sentry DSN. In the future, we might add attach/detach commands to make this work for all kinds of extensions.
Regarding process groups, that’s an interesting case. Most people are using process groups with the same codebase, but it’s worth considering how this could be handled. Right now the problem would be that both process groups share environment variables.
I’m getting the same error as @Yaeger when I try to access the /sentry page of one of my apps. Also, when I open the email link I got to finish setting up my Sentry account that got automatically created by Fly and click the Log in with Fly.io button I get the following error.