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

Move SentrySpanClientHttpRequestInterceptor to Spring module. #1181

Merged
merged 7 commits into from
Jan 18, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Enchancement: Support SENTRY_TRACES_SAMPLE_RATE conf. via env variables (#1171)
* Enhancement: Pass request to CustomSamplingContext in Spring integration (#1172)
* Fix: Free Local Refs manually due to Android local ref. count limits
* Enhancement: Move `SentrySpanClientHttpRequestInterceptor` to Spring module (#1181)
* Enhancement: Add overload for `transaction/span.finish(SpanStatus)` (#1182)

# 4.0.0-alpha.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.jakewharton.nopen.annotation.Open;
import io.sentry.IHub;
import io.sentry.spring.tracing.SentrySpanClientHttpRequestInterceptor;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.annotations.NotNull;
Expand Down
6 changes: 6 additions & 0 deletions sentry-spring/api/sentry-spring.api
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public class io/sentry/spring/tracing/SentrySpanAdvice : org/aopalliance/interce
public fun invoke (Lorg/aopalliance/intercept/MethodInvocation;)Ljava/lang/Object;
}

public class io/sentry/spring/tracing/SentrySpanClientHttpRequestInterceptor : org/springframework/http/client/ClientHttpRequestInterceptor {
public fun <init> (Lio/sentry/IHub;)V
public fun createUriTemplateHandler (Lorg/springframework/web/util/UriTemplateHandler;)Lorg/springframework/web/util/UriTemplateHandler;
public fun intercept (Lorg/springframework/http/HttpRequest;[BLorg/springframework/http/client/ClientHttpRequestExecution;)Lorg/springframework/http/client/ClientHttpResponse;
}

public class io/sentry/spring/tracing/SentryTracingFilter : org/springframework/web/filter/OncePerRequestFilter {
public fun <init> (Lio/sentry/IHub;Lio/sentry/SentryOptions;Lio/sentry/spring/SentryRequestResolver;)V
protected fun doFilterInternal (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.sentry.spring.boot;
package io.sentry.spring.tracing;

import com.jakewharton.nopen.annotation.Open;
import io.sentry.IHub;
Expand All @@ -21,7 +21,7 @@
import org.springframework.web.util.UriTemplateHandler;

@Open
class SentrySpanClientHttpRequestInterceptor implements ClientHttpRequestInterceptor {
public class SentrySpanClientHttpRequestInterceptor implements ClientHttpRequestInterceptor {
private static final @NotNull ThreadLocal<Deque<String>> urlTemplate =
new UrlTemplateThreadLocal();
private final @NotNull IHub hub;
Expand Down Expand Up @@ -60,7 +60,7 @@ public SentrySpanClientHttpRequestInterceptor(final @NotNull IHub hub) {
}
}

UriTemplateHandler createUriTemplateHandler(final @NotNull UriTemplateHandler delegate) {
public @NotNull UriTemplateHandler createUriTemplateHandler(final @NotNull UriTemplateHandler delegate) {
return new UriTemplateHandler() {

@Override
Expand Down