Skip to content

Commit

Permalink
Remove code that set tracesSampleRate to 0.0 for Spring Boot if n…
Browse files Browse the repository at this point in the history
…ot set (#2800)

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
  • Loading branch information
adinauer and getsentry-bot committed Jul 3, 2023
1 parent 581d779 commit c0ad3b3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
### Features

- Add manifest `AutoInit` to integrations list ([#2795](https://github.com/getsentry/sentry-java/pull/2795))
- Tracing headers (`sentry-trace` and `baggage`) are now attached and passed through even if performance is disabled ([#2788](https://github.com/getsentry/sentry-java/pull/2788))

### Fixes

- Set `environment` from `SentryOptions` if none persisted in ANRv2 ([#2809](https://github.com/getsentry/sentry-java/pull/2809))
- Remove code that set `tracesSampleRate` to `0.0` for Spring Boot if not set ([#2800](https://github.com/getsentry/sentry-java/pull/2800))
- This used to enable performance but not send any transactions by default.
- Performance is now disabled by default.

### Dependencies

Expand All @@ -35,6 +37,7 @@
This is only useful as additional information, because the SDK attempts to parse the thread dump into proper threads with stacktraces by default.
- If [ApplicationExitInfo#getTraceInputStream](https://developer.android.com/reference/android/app/ApplicationExitInfo#getTraceInputStream()) returns null, the SDK no longer reports an ANR event, as these events are not very useful without it.
- Enhance regex patterns for native stackframes
- Tracing headers (`sentry-trace` and `baggage`) are now attached and passed through even if performance is disabled ([#2788](https://github.com/getsentry/sentry-java/pull/2788))

## 6.23.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ static class HubConfiguration {
BuildConfig.SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME + "/" + BuildConfig.VERSION_NAME);
options.setSdkVersion(createSdkVersion(options));
addPackageAndIntegrationInfo();
if (options.getTracesSampleRate() == null && options.getEnableTracing() == null) {
options.setTracesSampleRate(0.0);
}
// Spring Boot sets ignored exceptions in runtime using reflection - where the generic
// information is lost
// its technically possible to set non-throwable class to `ignoredExceptionsForType` set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class SentryAutoConfigurationTest {
"sentry.dsn=http://key@localhost/proj"
).run {
val options = it.getBean(SentryProperties::class.java)
assertThat(options.tracesSampleRate).isNotNull().isEqualTo(0.0)
assertThat(options.tracesSampleRate).isNull()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ static class HubConfiguration {
BuildConfig.SENTRY_SPRING_BOOT_SDK_NAME + "/" + BuildConfig.VERSION_NAME);
options.setSdkVersion(createSdkVersion(options));
addPackageAndIntegrationInfo();
if (options.getTracesSampleRate() == null && options.getEnableTracing() == null) {
options.setTracesSampleRate(0.0);
}
// Spring Boot sets ignored exceptions in runtime using reflection - where the generic
// information is lost
// its technically possible to set non-throwable class to `ignoredExceptionsForType` set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class SentryAutoConfigurationTest {
"sentry.dsn=http://key@localhost/proj"
).run {
val options = it.getBean(SentryProperties::class.java)
assertThat(options.tracesSampleRate).isNotNull().isEqualTo(0.0)
assertThat(options.tracesSampleRate).isNull()
}
}

Expand Down

0 comments on commit c0ad3b3

Please sign in to comment.