File tree 4 files changed +12
-16
lines changed
sentry-samples-spring/src/main/java/io/sentry/samples/spring
sentry-samples-spring-jakarta/src/main/java/io/sentry/samples/spring/jakarta
4 files changed +12
-16
lines changed Original file line number Diff line number Diff line change 1
1
package io .sentry .samples .spring .jakarta ;
2
2
3
- import io .sentry .IScopes ;
3
+ import io .sentry .ScopesAdapter ;
4
4
import io .sentry .spring .jakarta .SentryUserFilter ;
5
5
import io .sentry .spring .jakarta .SentryUserProvider ;
6
6
import java .util .List ;
13
13
public class AppConfig {
14
14
15
15
@ Bean
16
- SentryUserFilter sentryUserFilter (
17
- final IScopes scopes , final List <SentryUserProvider > sentryUserProviders ) {
18
- return new SentryUserFilter (scopes , sentryUserProviders );
16
+ SentryUserFilter sentryUserFilter (final List <SentryUserProvider > sentryUserProviders ) {
17
+ return new SentryUserFilter (ScopesAdapter .getInstance (), sentryUserProviders );
19
18
}
20
19
}
Original file line number Diff line number Diff line change 1
1
package io .sentry .samples .spring .jakarta ;
2
2
3
- import io .sentry .IScopes ;
3
+ import io .sentry .ScopesAdapter ;
4
4
import io .sentry .spring .jakarta .tracing .SentrySpanClientHttpRequestInterceptor ;
5
5
import java .util .Collections ;
6
6
import org .springframework .context .annotation .Bean ;
@@ -20,14 +20,13 @@ public class WebConfig {
20
20
* Creates a {@link RestTemplate} which calls are intercepted with {@link
21
21
* SentrySpanClientHttpRequestInterceptor} to create spans around HTTP calls.
22
22
*
23
- * @param scopes - sentry scopes
24
23
* @return RestTemplate
25
24
*/
26
25
@ Bean
27
- RestTemplate restTemplate (IScopes scopes ) {
26
+ RestTemplate restTemplate () {
28
27
RestTemplate restTemplate = new RestTemplate ();
29
28
SentrySpanClientHttpRequestInterceptor sentryRestTemplateInterceptor =
30
- new SentrySpanClientHttpRequestInterceptor (scopes );
29
+ new SentrySpanClientHttpRequestInterceptor (ScopesAdapter . getInstance () );
31
30
restTemplate .setInterceptors (Collections .singletonList (sentryRestTemplateInterceptor ));
32
31
return restTemplate ;
33
32
}
Original file line number Diff line number Diff line change 1
1
package io .sentry .samples .spring ;
2
2
3
- import io .sentry .IScopes ;
3
+ import io .sentry .ScopesAdapter ;
4
4
import io .sentry .spring .SentryUserFilter ;
5
5
import io .sentry .spring .SentryUserProvider ;
6
6
import java .util .List ;
13
13
public class AppConfig {
14
14
15
15
@ Bean
16
- SentryUserFilter sentryUserFilter (
17
- final IScopes scopes , final List <SentryUserProvider > sentryUserProviders ) {
18
- return new SentryUserFilter (scopes , sentryUserProviders );
16
+ SentryUserFilter sentryUserFilter (final List <SentryUserProvider > sentryUserProviders ) {
17
+ return new SentryUserFilter (ScopesAdapter .getInstance (), sentryUserProviders );
19
18
}
20
19
}
Original file line number Diff line number Diff line change 1
1
package io .sentry .samples .spring ;
2
2
3
- import io .sentry .IScopes ;
3
+ import io .sentry .ScopesAdapter ;
4
4
import io .sentry .spring .tracing .SentrySpanClientHttpRequestInterceptor ;
5
5
import java .util .Collections ;
6
6
import org .springframework .context .annotation .Bean ;
@@ -20,14 +20,13 @@ public class WebConfig {
20
20
* Creates a {@link RestTemplate} which calls are intercepted with {@link
21
21
* SentrySpanClientHttpRequestInterceptor} to create spans around HTTP calls.
22
22
*
23
- * @param scopes - sentry scopes
24
23
* @return RestTemplate
25
24
*/
26
25
@ Bean
27
- RestTemplate restTemplate (IScopes scopes ) {
26
+ RestTemplate restTemplate () {
28
27
RestTemplate restTemplate = new RestTemplate ();
29
28
SentrySpanClientHttpRequestInterceptor sentryRestTemplateInterceptor =
30
- new SentrySpanClientHttpRequestInterceptor (scopes );
29
+ new SentrySpanClientHttpRequestInterceptor (ScopesAdapter . getInstance () );
31
30
restTemplate .setInterceptors (Collections .singletonList (sentryRestTemplateInterceptor ));
32
31
return restTemplate ;
33
32
}
You can’t perform that action at this time.
0 commit comments