Closed dandanlen closed 3 years ago
Maybe this could be worth looking into in our remaining time? Just in case there are problems lurking still that we haven't yet caught.
I had a look at this yesterday - can't reproduce but my best guess is that the exceptions in question were somehow 'outside' the sentry wrapper (ie. before hitting Asp.NET, maybe in Kestrel?). I'm confident that any exceptions in the application itself (ie. query processing, api error etc.) are caught and logged / propagated to sentry. Not sure digging too deep here would be a very productive use of our time.
Only thing I can think of is adding sentry "sooner"? I.e. moving it to be the first service added? Or wouldn't that work? https://github.com/diffix/explorer/blob/master/src/explorer.api/Startup.cs#L43-L44
Likely a rather pointless exercise. I'll close for now.
Actually Sentry is added before any other services (and this is taken pretty much straight from their reference implementation): https://github.com/diffix/explorer/blob/f09f94903c4bfd28bbb6e449704aeaf0cf8b7733/src/explorer.api/Program.cs#L33
The line you linked above just registers a custom handler to add some extra information (git hash, branch info I think).
I agree, chasing this much further is rather pointless.
See #231
It looks like some classes of exceptions are not caught by the sentry middleware.