Plug sentry as an ActixWeb middleware #4024
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an experiment using sentry to track HTTP issues that could be returned to the clients. The
SENTRY_DSN
is not shipped with the binary as of now, as we prefer to try it on the Cloud. However, our users can define theSENTRY_DSN
environment variable they want to keep track of the Meilisearch issues on their own.The main problem I feared was a blow-up of the meilisearch binary size when adding sentry. The binary size for macOS x86_64 with sentry is 107M, and without is 106M. To conclude, adding the sentry and sentry-actix dependencies doesn't add much to the binary size. The compile time is 6m 21s on my iMac x86_64 when sentry is enabled and 6m 26s without for a fresh release build. So, no impact on the indexing time.
I will now need to try it out and generate errors on the Meilisearch side to see how well-formatted and helpful the sentry reports are.