Remove unused private method
This commit is contained in:
parent
0043efa164
commit
fff8006e51
|
@ -3,8 +3,6 @@ package datadog.trace.instrumentation.springwebflux.client;
|
||||||
import static datadog.trace.instrumentation.springwebflux.client.SpringWebfluxHttpClientDecorator.DECORATE;
|
import static datadog.trace.instrumentation.springwebflux.client.SpringWebfluxHttpClientDecorator.DECORATE;
|
||||||
|
|
||||||
import io.opentracing.Span;
|
import io.opentracing.Span;
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
import org.reactivestreams.Subscription;
|
import org.reactivestreams.Subscription;
|
||||||
import org.springframework.web.reactive.function.client.ClientRequest;
|
import org.springframework.web.reactive.function.client.ClientRequest;
|
||||||
import org.springframework.web.reactive.function.client.ClientResponse;
|
import org.springframework.web.reactive.function.client.ClientResponse;
|
||||||
|
@ -19,10 +17,10 @@ public class TracingClientResponseSubscriber implements CoreSubscriber<ClientRes
|
||||||
private final Span span;
|
private final Span span;
|
||||||
|
|
||||||
public TracingClientResponseSubscriber(
|
public TracingClientResponseSubscriber(
|
||||||
final CoreSubscriber<? super ClientResponse> subscriber,
|
final CoreSubscriber<? super ClientResponse> subscriber,
|
||||||
final ClientRequest clientRequest,
|
final ClientRequest clientRequest,
|
||||||
final Context context,
|
final Context context,
|
||||||
final Span span) {
|
final Span span) {
|
||||||
this.subscriber = subscriber;
|
this.subscriber = subscriber;
|
||||||
this.clientRequest = clientRequest;
|
this.clientRequest = clientRequest;
|
||||||
this.context = context.put(Span.class, span);
|
this.context = context.put(Span.class, span);
|
||||||
|
@ -34,28 +32,20 @@ public class TracingClientResponseSubscriber implements CoreSubscriber<ClientRes
|
||||||
DECORATE.onRequest(span, clientRequest);
|
DECORATE.onRequest(span, clientRequest);
|
||||||
|
|
||||||
subscriber.onSubscribe(
|
subscriber.onSubscribe(
|
||||||
new Subscription() {
|
new Subscription() {
|
||||||
@Override
|
@Override
|
||||||
public void request(final long n) {
|
public void request(final long n) {
|
||||||
subscription.request(n);
|
subscription.request(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel() {
|
public void cancel() {
|
||||||
DECORATE.onCancel(span);
|
DECORATE.onCancel(span);
|
||||||
DECORATE.beforeFinish(span);
|
DECORATE.beforeFinish(span);
|
||||||
subscription.cancel();
|
subscription.cancel();
|
||||||
span.finish();
|
span.finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
private InetAddress remoteAddress() {
|
|
||||||
try {
|
|
||||||
return InetAddress.getByName(clientRequest.url().getHost());
|
|
||||||
} catch (final UnknownHostException e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue