Skip to content
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

Remove code that set tracesSampleRate to 0.0 for Spring Boot if not set #2800

Merged
merged 26 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fdf5953
TwP
adinauer Jun 14, 2023
6eba5bc
fix tests
adinauer Jun 15, 2023
537b3fb
also add headers for okhttp if no span is active; add tests; fix exis…
adinauer Jun 19, 2023
686eb4e
Change trace and traceIfAllowed to return instead of taking a callback
adinauer Jun 19, 2023
62a3b39
Merge branch 'main' into feat/tracing-without-performance
adinauer Jun 19, 2023
4e850af
Start new trace in ActivityLifecycleIntegratin
adinauer Jun 19, 2023
15ad792
Also start a new trace in SentryNavigationListener
adinauer Jun 19, 2023
3cb799c
Add tests for continueTrace in spring filters
adinauer Jun 20, 2023
5feaac9
Add changelog
adinauer Jun 20, 2023
2bf3e3e
Merge branch 'main' into feat/tracing-without-performance
adinauer Jun 20, 2023
1b1f062
Add test for TracingUtils
adinauer Jun 20, 2023
66e4bdb
More tests
adinauer Jun 20, 2023
b6bfe7e
Switch from AtomicReference to holder class
adinauer Jun 22, 2023
104ac37
Format code
getsentry-bot Jun 22, 2023
2266d58
Changes according to reviews
adinauer Jun 22, 2023
13a6a38
Merge branch 'main' into feat/tracing-without-performance
adinauer Jun 22, 2023
0bb6886
Start new trace in SentryGestureListener
adinauer Jun 22, 2023
49b1699
More tests
adinauer Jun 23, 2023
e7e50bd
Synchronize on scope for trace creation and usage from scope
adinauer Jun 26, 2023
4e5f6aa
Add withPropagationContext to Scope and synchronize using a private lock
adinauer Jun 26, 2023
1ec1b5d
Default to false for sampled decision of incoming trace without expli…
adinauer Jun 26, 2023
29f9cd1
Remove workaround
adinauer Jun 26, 2023
67813f7
Changelog
adinauer Jun 27, 2023
908b60e
Merge branch 'main' into feat/remove-spring-traces-sample-rate-workar…
adinauer Jul 3, 2023
cbfad4f
changelog
adinauer Jul 3, 2023
09c8022
fix changelog
adinauer Jul 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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