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.
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
GH-394 Add Sentry integration #808
base: master
Are you sure you want to change the base?
GH-394 Add Sentry integration #808
Changes from 4 commits
75445f7
8875c8b
76e94e1
b56a21a
26f5955
cdb7963
c1c004a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance Sentry integration with additional context.
While the basic Sentry integration is correct, consider enriching the captured exceptions with additional context for more effective debugging and error analysis.
Here's a suggested improvement:
This change adds valuable context to Sentry events, including the command name, sender, and command type, which can greatly aid in debugging and error analysis.
📝 Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid sending the list of plugins as a Sentry tag to protect privacy
Including the list of installed plugins may expose sensitive information about the server configuration or third-party plugins in use. This could have privacy implications or unintentionally reveal vulnerabilities.
Consider removing this tag or anonymizing the data to safeguard user privacy.
🛠️ Refactor suggestion
Address potential compatibility issues with Java versions before 16
The
toList()
method inArrays.stream(server.getPluginManager().getPlugins()).toList()
is available from Java 16 onwards. If your project needs to support earlier Java versions, consider usingcollect(Collectors.toList())
.Improve formatting of the plugin list for Sentry tag
Using
toString()
on the list may not provide a clear and readable format in Sentry. To enhance readability, join the plugin names into a comma-separated string.Apply this refactor:
📝 Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid sending the server version as a Sentry tag to enhance security
Exposing the server version may provide potential attackers with information about specific vulnerabilities associated with that version. It's advisable to omit this tag or generalize the version information to prevent disclosing detailed server metadata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trochę mało wydajne te streamy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co proponujesz, zwykłe pętle
for()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jakieś hashmapy sety coś takiego...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trochę łopatologiczne Lucky jakoś globalnie kiedyś łapał błędy ale nw czy to tylko na wątki działa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poprawiłem indentację
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ale łopatologiczne jest używanie wszędzie
Sentry#captureException
, czy co masz na myśli? Musimy tak robić bo ja nie łapię wszystkich błędów celowo, np. tych argumentów z LC, bo przecież tam to jest wina stricte useraThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wątek w Javie ma coś takiego jak uncatched handler tyle, że musi wywalić wątek aby to złapało to część case już ogarnie... warto pomyśleć nad tym