-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add support for "ignoredErrors" functionality in Sentry SDK #286
Conversation
Bumps [io.sentry:sentry-jul](https://github.com/getsentry/sentry-java) from 7.8.0 to 8.2.0. - [Release notes](https://github.com/getsentry/sentry-java/releases) - [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md) - [Commits](getsentry/sentry-java@7.8.0...8.2.0) --- updated-dependencies: - dependency-name: io.sentry:sentry-jul dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
runtime/src/main/java/io/quarkus/logging/sentry/SentryConfig.java
Outdated
Show resolved
Hide resolved
runtime/src/main/java/io/quarkus/logging/sentry/SentryHandlerValueFactory.java
Outdated
Show resolved
Hide resolved
runtime/src/main/java/io/quarkus/logging/sentry/SentryHandlerValueFactory.java
Outdated
Show resolved
Hide resolved
7c42313
to
8219be7
Compare
# Conflicts: # pom.xml # runtime/src/main/java/io/quarkus/logging/sentry/SentryHandlerValueFactory.java
I am going to release 2.0.8 now. Then I will do a 2.1.0 on the latest Quarkus 3.19 and this fix as well. |
Isn't Quarkus 3.19 still at version CR1? Edit: it has been released a very short time ago. It's not even mentioned on the front page on https://quarkus.io. |
I can bump to 3.18.4 which is the latest 3.18 for this release. It just needs the new CONFIG stuff. |
@all-contributors add @dalbani for code |
I've put up a pull request to add @dalbani! 🎉 |
actually it looks like i can leave it 3.15.3! |
@dalbani 2.1.0 is in Maven Central if you want to try it. |
For those who might be interested in using the feature, I've run into an issue when trying to set ignored errors via So, in the meantime, I worked around the issue by setting the "low-level" environment variable By the way, as I mentioned above, the Line 34 in 4e5e91c
|
Seems redundant to me. Wanna submit a PR? Also did you report the original issue to the Sentry SDK team? |
@dalbani i am new to Sentry but can you explain how breadcrumbs work? so the docs say this
So if I do this... public String nope() {
LOG.info("Log before throwing a runtime error!");
sentryLogger.info("Log before throwing a runtime error!");
throw new RuntimeException("broken");
} I get the Sentry error for the RuntimeException but I was expecting to see the LOG.INFO message as "breadcrumb" and I am not. So there is something I am not understanding about breadcrumbs? |
I've just done it at getsentry/sentry-java#4205. |
I'm not really familiar with breadcrumbs, to be honest. |
@melloware this should be working if you set |
@adinauer yep I am doing exactly that let me debug futher I had the minimumBreadCrumbLevel set properly but was definitely not seeing any logs like in your JUL example above. |
@melloware can you attach a debugger and check |
@adinauer yep will try and get to this today. |
Here is a simple reproducer: Unzip and point your DNS in application.properties
Then run Hit |
@melloware
But it doesn't seem to work as the list as The reason why I ask for environment variables specifically is that I'm using the Quarkus extension in Keycloak on Kubernetes, where environment variables are the only option I have to pass settings AFAIK. |
@dalbani this would probably be a good @radcortez question or on the Zulip channel? |
Thanks for the suggestion. I've just tried in a dummy Quarkus app where I could put the settings in
And it did work then. So there must be magic I'm missing with environment variables. |
Yes, it should work, but it seems that having the declaration: @Deprecated(forRemoval = true)
@WithParentName
Optional<Boolean> enable(); Is causing the that env name to not be matched. I'll have a look. In the meantime you can use the rules of environment values detailed here: https://quarkus.io/guides/config-reference#environment-variables. Just add an empty |
thanks @radcortez ! |
Doh, of course, until I can use environment variables, I can simply pass the settings to the JVM with |
You can still use environment variables, you just need to have the correct name of the configuration in some source like When a mapping is unavailable to help with the matching, you can set a So, even if the mapping matching has a bug, you can still rely on the hint matching. |
@dalbani once you confirm and get this working can you submit a PR updating the asciidoc Guide for other users related to ignore errors? |
As I mentioned above, my use case is using this extension in Keycloak on Kubernetes, where I don't have the ability to have such an |
Depends on the Sentry SDK update at #284.