Skip to content

Commit

Permalink
Bump to OpenTracing 0.33 (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand authored Nov 30, 2019
1 parent 653166f commit f64f87e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public String localSpan(HttpServletRequest request) {
@RequestMapping("/async")
public Callable<String> async() {
verifyActiveSpan();
final Span cont = tracer.scopeManager().active().span();
final Span cont = tracer.scopeManager().activeSpan();
return new Callable<String>() {
public String call() throws Exception {
try (Scope scope = tracer.scopeManager().activate(cont, false)) {
if (tracer.scopeManager().active() == null) {
try (Scope scope = tracer.scopeManager().activate(cont)) {
if (tracer.scopeManager().activeSpan() == null) {
throw new RuntimeException("No active span");
}
Thread.sleep(1000);
Expand Down Expand Up @@ -161,7 +161,7 @@ public void mappedExceptionHandler(MappedException ex) {
}

private void verifyActiveSpan() {
if (tracer.scopeManager().active() == null) {
if (tracer.scopeManager().activeSpan() == null) {
throw new RuntimeException("No active span");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void subscribe(final CoreSubscriber<? super ClientResponse> subscriber) {
.withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT)
.start();

try (final Scope scope = tracer.scopeManager().activate(span, false)) {
try (final Scope scope = tracer.scopeManager().activate(span)) {
final ClientRequest.Builder requestBuilder = ClientRequest.from(request);
requestBuilder.headers(httpHeaders ->
tracer.inject(span.context(), Format.Builtin.HTTP_HEADERS, new HttpHeadersCarrier(httpHeaders)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void subscribe(final CoreSubscriber<? super Void> subscriber) {
.withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER)
.start();

try (final Scope scope = tracer.scopeManager().activate(span, false)) {
try (final Scope scope = tracer.scopeManager().activate(span)) {
exchange.getAttributes().put(TracingWebFilter.SERVER_SPAN_CONTEXT, span.context());
source.subscribe(new TracingSubscriber(subscriber, exchange, context, span, spanDecorators));
}
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@
<main.basedir>${project.basedir}</main.basedir>

<version.org.awaitility-awaitility>3.0.0</version.org.awaitility-awaitility>
<version.io.opentracing>0.32.0</version.io.opentracing>
<version.io.opentracing.contrib-opentracing-web-servlet-filter>0.3.0</version.io.opentracing.contrib-opentracing-web-servlet-filter>
<version.io.opentracing.contrib-opentracing-tracerresolver>0.1.6</version.io.opentracing.contrib-opentracing-tracerresolver>
<version.io.opentracing.contrib-opentracing-spring-tracer-configuration-starter>0.2.0</version.io.opentracing.contrib-opentracing-spring-tracer-configuration-starter>
<version.io.opentracing>0.33.0</version.io.opentracing>
<version.io.opentracing.contrib-opentracing-web-servlet-filter>0.4.0</version.io.opentracing.contrib-opentracing-web-servlet-filter>
<version.io.opentracing.contrib-opentracing-tracerresolver>0.1.8</version.io.opentracing.contrib-opentracing-tracerresolver>
<version.io.opentracing.contrib-opentracing-spring-tracer-configuration-starter>0.3.1</version.io.opentracing.contrib-opentracing-spring-tracer-configuration-starter>
<version.junit>4.12</version.junit>
<version.org.mockito-mockito-core>2.23.4</version.org.mockito-mockito-core>
<version.org.springframework.boot>2.1.5.RELEASE</version.org.springframework.boot>
<version.org.springframework.boot>2.1.6.RELEASE</version.org.springframework.boot>
<!-- Should match version from https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-dependencies/pom.xml -->
<version.org.springframework>5.1.7.RELEASE</version.org.springframework>
<version.org.springframework>5.1.8.RELEASE</version.org.springframework>
<version.com.github.tomakehurst-wiremock-jre8>2.21.0</version.com.github.tomakehurst-wiremock-jre8>
<version.io.projectreactor.netty-reactor-netty>0.8.5.RELEASE</version.io.projectreactor.netty-reactor-netty>

Expand Down

0 comments on commit f64f87e

Please sign in to comment.