File tree Expand file tree Collapse file tree 7 files changed +11
-20
lines changed
sentry-log4j2/src/main/java/io/sentry/log4j2
sentry-logback/src/main/java/io/sentry/logback
sentry-spring-boot-starter-jakarta/src
main/java/io/sentry/spring/boot/jakarta
test/kotlin/io/sentry/spring/boot/jakarta
sentry-spring-boot-starter/src
main/java/io/sentry/spring/boot
test/kotlin/io/sentry/spring/boot Expand file tree Collapse file tree 7 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 99### Fixes
1010
1111- Deprecate reportFullDisplayed in favor of reportFullyDisplayed ([ #2585 ] ( https://github.com/getsentry/sentry-java/pull/2585 ) )
12+ - Add version to sentryClientName used in auth header ([ #2596 ] ( https://github.com/getsentry/sentry-java/pull/2596 ) )
1213
1314## 6.15.0
1415
Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ public void start() {
121121 if (debug != null ) {
122122 options .setDebug (debug );
123123 }
124- options .setSentryClientName (BuildConfig .SENTRY_LOG4J2_SDK_NAME );
124+ options .setSentryClientName (
125+ BuildConfig .SENTRY_LOG4J2_SDK_NAME + "/" + BuildConfig .VERSION_NAME );
125126 options .setSdkVersion (createSdkVersion (options ));
126127 if (contextTags != null ) {
127128 for (final String contextTag : contextTags ) {
Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ public void start() {
5050 if (!Sentry .isEnabled ()) {
5151 if (options .getDsn () == null || !options .getDsn ().endsWith ("_IS_UNDEFINED" )) {
5252 options .setEnableExternalConfiguration (true );
53- options .setSentryClientName (BuildConfig .SENTRY_LOGBACK_SDK_NAME );
53+ options .setSentryClientName (
54+ BuildConfig .SENTRY_LOGBACK_SDK_NAME + "/" + BuildConfig .VERSION_NAME );
5455 options .setSdkVersion (createSdkVersion (options ));
5556 Optional .ofNullable (transportFactory ).ifPresent (options ::setTransportFactory );
5657 try {
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ static class HubConfiguration {
115115 }
116116 });
117117
118- options .setSentryClientName (BuildConfig .SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME );
118+ options .setSentryClientName (
119+ BuildConfig .SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME + "/" + BuildConfig .VERSION_NAME );
119120 options .setSdkVersion (createSdkVersion (options ));
120121 addPackageAndIntegrationInfo ();
121122 if (options .getTracesSampleRate () == null && options .getEnableTracing () == null ) {
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ class SentryAutoConfigurationTest {
244244 fun `sets sentryClientName property on SentryOptions` () {
245245 contextRunner.withPropertyValues(" sentry.dsn=http://key@localhost/proj" )
246246 .run {
247- assertThat(it.getBean(SentryOptions ::class .java).sentryClientName).isEqualTo(" sentry.java.spring-boot${optionalJakartaPrefix() }" )
247+ assertThat(it.getBean(SentryOptions ::class .java).sentryClientName).isEqualTo(" sentry.java.spring-boot.jakarta/ ${ BuildConfig . VERSION_NAME }" )
248248 }
249249 }
250250
@@ -924,11 +924,4 @@ class SentryAutoConfigurationTest {
924924 val userFilter = this .getBean(" sentryUserFilter" , FilterRegistrationBean ::class .java).filter as SentryUserFilter
925925 return userFilter.sentryUserProviders
926926 }
927-
928- private fun optionalJakartaPrefix (): String {
929- if (this .javaClass.packageName.endsWith(" jakarta" )) {
930- return " .jakarta"
931- }
932- return " "
933- }
934927}
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ static class HubConfiguration {
115115 }
116116 });
117117
118- options .setSentryClientName (BuildConfig .SENTRY_SPRING_BOOT_SDK_NAME );
118+ options .setSentryClientName (
119+ BuildConfig .SENTRY_SPRING_BOOT_SDK_NAME + "/" + BuildConfig .VERSION_NAME );
119120 options .setSdkVersion (createSdkVersion (options ));
120121 addPackageAndIntegrationInfo ();
121122 if (options .getTracesSampleRate () == null && options .getEnableTracing () == null ) {
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ class SentryAutoConfigurationTest {
244244 fun `sets sentryClientName property on SentryOptions` () {
245245 contextRunner.withPropertyValues(" sentry.dsn=http://key@localhost/proj" )
246246 .run {
247- assertThat(it.getBean(SentryOptions ::class .java).sentryClientName).isEqualTo(" sentry.java.spring-boot${optionalJakartaPrefix() }" )
247+ assertThat(it.getBean(SentryOptions ::class .java).sentryClientName).isEqualTo(" sentry.java.spring-boot/ ${ BuildConfig . VERSION_NAME }" )
248248 }
249249 }
250250
@@ -924,11 +924,4 @@ class SentryAutoConfigurationTest {
924924 val userFilter = this .getBean(" sentryUserFilter" , FilterRegistrationBean ::class .java).filter as SentryUserFilter
925925 return userFilter.sentryUserProviders
926926 }
927-
928- private fun optionalJakartaPrefix (): String {
929- if (this .javaClass.packageName.endsWith(" jakarta" )) {
930- return " .jakarta"
931- }
932- return " "
933- }
934927}
You can’t perform that action at this time.
0 commit comments