Skip to content

Commit

Permalink
Merge branch 'deps/scripts/update-sentry-native-ndk.sh/0.7.19' of git…
Browse files Browse the repository at this point in the history
…hub.com:getsentry/sentry-java into deps/scripts/update-sentry-native-ndk.sh/0.7.19
  • Loading branch information
markushi committed Jan 30, 2025
2 parents 8e851be + 61e77c0 commit 4abad64
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 24 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
- Remove `java.lang.ClassNotFoundException` debug logs when searching for OpenTelemetry marker classes ([#4091](https://github.com/getsentry/sentry-java/pull/4091))
- There was up to three of these, one for `io.sentry.opentelemetry.agent.AgentMarker`, `io.sentry.opentelemetry.agent.AgentlessMarker` and `io.sentry.opentelemetry.agent.AgentlessSpringMarker`.
- These were not indicators of something being wrong but rather the SDK looking at what is available at runtime to configure itself accordingly.
- Set mechanism `type` to `suppressed` for suppressed exceptions ([#4125](https://github.com/getsentry/sentry-java/pull/4125))
- This helps to distinguish an exceptions cause from any suppressed exceptions in the Sentry UI

### Dependencies

- Bump Spring Boot to `3.4.2` ([#4081](https://github.com/getsentry/sentry-java/pull/4081))
- Bump Native SDK from v0.7.14 to v0.7.19 ([#4076](https://github.com/getsentry/sentry-java/pull/4076))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0719)
- [diff](https://github.com/getsentry/sentry-native/compare/v0.7.14...0.7.19)

### Dependencies

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ object Config {
val kotlinStdLib = "stdlib-jdk8"

val springBootVersion = "2.7.5"
val springBoot3Version = "3.4.0"
val springBoot3Version = "3.4.2"
val kotlinCompatibleLanguageVersion = "1.4"

val composeVersion = "1.5.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies {
implementation(Config.Libs.aspectj)
implementation(Config.Libs.springBoot3Starter)
implementation(Config.Libs.kotlinReflect)
implementation(Config.Libs.springBootStarterJdbc)
implementation(Config.Libs.springBoot3StarterJdbc)
implementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
implementation(projects.sentrySpringBootStarterJakarta)
implementation(projects.sentryLogback)
Expand All @@ -62,7 +62,7 @@ dependencies {
}
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(Config.TestLibs.kotlinTestJunit)
testImplementation("ch.qos.logback:logback-classic:1.3.5")
testImplementation("ch.qos.logback:logback-classic:1.5.16")
testImplementation(Config.Libs.slf4jApi2)
testImplementation(Config.Libs.apolloKotlin)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependencies {
implementation(Config.Libs.aspectj)
implementation(Config.Libs.springBoot3Starter)
implementation(Config.Libs.kotlinReflect)
implementation(Config.Libs.springBootStarterJdbc)
implementation(Config.Libs.springBoot3StarterJdbc)
implementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
implementation(projects.sentrySpringBootStarterJakarta)
implementation(projects.sentryLogback)
Expand All @@ -63,7 +63,7 @@ dependencies {
}
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(Config.TestLibs.kotlinTestJunit)
testImplementation("ch.qos.logback:logback-classic:1.3.5")
testImplementation("ch.qos.logback:logback-classic:1.5.16")
testImplementation(Config.Libs.slf4jApi2)
testImplementation(Config.Libs.apolloKotlin)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies {
implementation(Config.Libs.aspectj)
implementation(Config.Libs.springBoot3Starter)
implementation(Config.Libs.kotlinReflect)
implementation(Config.Libs.springBootStarterJdbc)
implementation(Config.Libs.springBoot3StarterJdbc)
implementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
implementation(projects.sentrySpringBootStarterJakarta)
implementation(projects.sentryLogback)
Expand All @@ -61,7 +61,7 @@ dependencies {
}
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(Config.TestLibs.kotlinTestJunit)
testImplementation("ch.qos.logback:logback-classic:1.3.5")
testImplementation("ch.qos.logback:logback-classic:1.5.16")
testImplementation(Config.Libs.slf4jApi2)
testImplementation(Config.Libs.apolloKotlin)
testImplementation(projects.sentry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {
}
testImplementation(kotlin(Config.kotlinStdLib))
testImplementation(Config.TestLibs.kotlinTestJunit)
testImplementation("ch.qos.logback:logback-classic:1.3.5")
testImplementation("ch.qos.logback:logback-classic:1.5.16")
testImplementation(Config.Libs.slf4jApi2)
testImplementation(Config.Libs.apolloKotlin)
}
Expand Down
12 changes: 8 additions & 4 deletions sentry/src/main/java/io/sentry/SentryExceptionFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ public List<SentryException> getSentryExceptions(final @NotNull Throwable throwa
@NotNull
Deque<SentryException> extractExceptionQueue(final @NotNull Throwable throwable) {
return extractExceptionQueueInternal(
throwable, new AtomicInteger(-1), new HashSet<>(), new ArrayDeque<>());
throwable, new AtomicInteger(-1), new HashSet<>(), new ArrayDeque<>(), null);
}

Deque<SentryException> extractExceptionQueueInternal(
final @NotNull Throwable throwable,
final @NotNull AtomicInteger exceptionId,
final @NotNull HashSet<Throwable> circularityDetector,
final @NotNull Deque<SentryException> exceptions) {
final @NotNull Deque<SentryException> exceptions,
@Nullable String mechanismTypeOverride) {
Mechanism exceptionMechanism;
Thread thread;

Expand All @@ -154,6 +155,8 @@ Deque<SentryException> extractExceptionQueueInternal(
// Stack the exceptions to send them in the reverse order
while (currentThrowable != null && circularityDetector.add(currentThrowable)) {
boolean snapshot = false;
final @NotNull String mechanismType =
mechanismTypeOverride == null ? "chained" : mechanismTypeOverride;
if (currentThrowable instanceof ExceptionMechanismException) {
// this is for ANR I believe
ExceptionMechanismException exceptionMechanismThrowable =
Expand All @@ -177,7 +180,7 @@ Deque<SentryException> extractExceptionQueueInternal(
exceptions.addFirst(exception);

if (exceptionMechanism.getType() == null) {
exceptionMechanism.setType("chained");
exceptionMechanism.setType(mechanismType);
}

if (exceptionId.get() >= 0) {
Expand All @@ -194,11 +197,12 @@ Deque<SentryException> extractExceptionQueueInternal(
// exceptionMechanism.setExceptionGroup(true);
for (Throwable suppressedThrowable : suppressed) {
extractExceptionQueueInternal(
suppressedThrowable, exceptionId, circularityDetector, exceptions);
suppressedThrowable, exceptionId, circularityDetector, exceptions, "suppressed");
}
}
currentThrowable = currentThrowable.getCause();
parentId = currentExceptionId;
mechanismTypeOverride = null;
}

return exceptions;
Expand Down
63 changes: 61 additions & 2 deletions sentry/src/main/java/io/sentry/SentryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,19 @@ public class SentryOptions {
/** Whether to enable scope persistence so the scope values are preserved if the process dies */
private boolean enableScopePersistence = true;

/** Contains a list of monitor slugs for which check-ins should not be sent. */
/** The monitor slugs for which captured check-ins should not be sent to Sentry. */
@ApiStatus.Experimental private @Nullable List<FilterString> ignoredCheckIns = null;

/** Contains a list of span origins for which spans / transactions should not be created. */
/**
* Strings or regex patterns that the origin of a new span/transaction will be tested against. If
* there is a match, the span/transaction will not be created.
*/
@ApiStatus.Experimental private @Nullable List<FilterString> ignoredSpanOrigins = null;

/**
* Strings or regex patterns that captured transaction names will be tested against. If there is a
* match, the transaction will not be sent to Sentry.
*/
private @Nullable List<FilterString> ignoredTransactions = null;

@ApiStatus.Experimental
Expand Down Expand Up @@ -2238,11 +2245,23 @@ public void setSendModules(boolean sendModules) {
this.sendModules = sendModules;
}

/**
* Returns the list of strings/regex patterns the origin of a new span/transaction will be tested
* against to determine whether the span/transaction shall be created.
*
* @return the list of strings or regex patterns
*/
@ApiStatus.Experimental
public @Nullable List<FilterString> getIgnoredSpanOrigins() {
return ignoredSpanOrigins;
}

/**
* Adds an item to the list of strings/regex patterns the origin of a new span/transaction will be
* tested against to determine whether the span/transaction shall be created.
*
* @param ignoredSpanOrigin the string/regex pattern
*/
@ApiStatus.Experimental
public void addIgnoredSpanOrigin(String ignoredSpanOrigin) {
if (ignoredSpanOrigins == null) {
Expand All @@ -2251,6 +2270,12 @@ public void addIgnoredSpanOrigin(String ignoredSpanOrigin) {
ignoredSpanOrigins.add(new FilterString(ignoredSpanOrigin));
}

/**
* Sets the list of strings/regex patterns the origin of a new span/transaction will be tested
* against to determine whether the span/transaction shall be created.
*
* @param ignoredSpanOrigins the list of strings/regex patterns
*/
@ApiStatus.Experimental
public void setIgnoredSpanOrigins(final @Nullable List<String> ignoredSpanOrigins) {
if (ignoredSpanOrigins == null) {
Expand All @@ -2267,11 +2292,22 @@ public void setIgnoredSpanOrigins(final @Nullable List<String> ignoredSpanOrigin
}
}

/**
* Returns the list of monitor slugs for which captured check-ins should not be sent to Sentry.
*
* @return the list of monitor slugs
*/
@ApiStatus.Experimental
public @Nullable List<FilterString> getIgnoredCheckIns() {
return ignoredCheckIns;
}

/**
* Adds a monitor slug to the list of slugs for which captured check-ins should not be sent to
* Sentry.
*
* @param ignoredCheckIn the monitor slug
*/
@ApiStatus.Experimental
public void addIgnoredCheckIn(String ignoredCheckIn) {
if (ignoredCheckIns == null) {
Expand All @@ -2280,6 +2316,11 @@ public void addIgnoredCheckIn(String ignoredCheckIn) {
ignoredCheckIns.add(new FilterString(ignoredCheckIn));
}

/**
* Sets the list of monitor slugs for which captured check-ins should not be sent to Sentry.
*
* @param ignoredCheckIns the list of monitor slugs for which check-ins should not be sent
*/
@ApiStatus.Experimental
public void setIgnoredCheckIns(final @Nullable List<String> ignoredCheckIns) {
if (ignoredCheckIns == null) {
Expand All @@ -2296,10 +2337,22 @@ public void setIgnoredCheckIns(final @Nullable List<String> ignoredCheckIns) {
}
}

/**
* Returns the list of strings/regex patterns that captured transaction names are checked against
* to determine if a transaction shall be sent to Sentry or ignored.
*
* @return the list of strings/regex patterns
*/
public @Nullable List<FilterString> getIgnoredTransactions() {
return ignoredTransactions;
}

/**
* Adds an element the list of strings/regex patterns that captured transaction names are checked
* against to determine if a transaction shall be sent to Sentry or ignored.
*
* @param ignoredTransaction the string/regex pattern
*/
@ApiStatus.Experimental
public void addIgnoredTransaction(String ignoredTransaction) {
if (ignoredTransactions == null) {
Expand All @@ -2308,6 +2361,12 @@ public void addIgnoredTransaction(String ignoredTransaction) {
ignoredTransactions.add(new FilterString(ignoredTransaction));
}

/**
* Sets the list of strings/regex patterns that captured transaction names are checked against to
* determine if a transaction shall be sent to Sentry or ignored.
*
* @param ignoredTransactions the list of string/regex patterns
*/
@ApiStatus.Experimental
public void setIgnoredTransactions(final @Nullable List<String> ignoredTransactions) {
if (ignoredTransactions == null) {
Expand Down
Loading

0 comments on commit 4abad64

Please sign in to comment.