Skip to content

Commit

Permalink
Update dependencies (#2892)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeqo authored and adriancole committed Oct 29, 2019
1 parent e690e35 commit 7d1f9ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<!-- This allows you to test feature branches with jitpack -->
<armeria.groupId>com.linecorp.armeria</armeria.groupId>
<armeria.version>0.94.0</armeria.version>
<armeria.version>0.95.0</armeria.version>
<!-- This should only be used in tests, and be careful to avoid >= v20 apis -->
<guava.version>28.1-jre</guava.version>

Expand All @@ -73,15 +73,12 @@

<junit.version>4.12</junit.version>
<junit.jupiter.version>5.5.2</junit.jupiter.version>
<powermock.version>2.0.2</powermock.version>
<!-- Up to v2.27.0 of mockito has a conflict https://github.com/mockito/mockito/issues/1606
java.lang.NoSuchMethodError: net.bytebuddy.dynamic.loading.MultipleParentClassLoader$Builder.appendMostSpecific(Ljava/util/Collection;)Lnet/bytebuddy/dynamic/loading/MultipleParentClassLoader$Builder
-->
<mockito.version>2.23.4</mockito.version>
<powermock.version>2.0.4</powermock.version>
<mockito.version>2.28.2</mockito.version>
<assertj.version>3.13.2</assertj.version>
<awaitility.version>4.0.1</awaitility.version>
<hamcrest.version>1.3</hamcrest.version>
<testcontainers.version>1.12.2</testcontainers.version>
<testcontainers.version>1.12.3</testcontainers.version>

<auto-value.version>1.7</auto-value.version>
<animal-sniffer-maven-plugin.version>1.18</animal-sniffer-maven-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.linecorp.armeria.common.MediaType;
import com.linecorp.armeria.common.ResponseHeaders;
import com.linecorp.armeria.common.ResponseHeadersBuilder;
import com.linecorp.armeria.server.annotation.Blocking;
import com.linecorp.armeria.server.annotation.Default;
import com.linecorp.armeria.server.annotation.ExceptionHandler;
import com.linecorp.armeria.server.annotation.Get;
Expand Down Expand Up @@ -76,6 +77,7 @@ public class ZipkinQueryApiV2 {
}

@Get("/api/v2/dependencies")
@Blocking
public AggregatedHttpResponse getDependencies(
@Param("endTs") long endTs,
@Param("lookback") Optional<Long> lookback) throws IOException {
Expand All @@ -85,20 +87,23 @@ public AggregatedHttpResponse getDependencies(
}

@Get("/api/v2/services")
@Blocking
public AggregatedHttpResponse getServiceNames() throws IOException {
List<String> serviceNames = storage.serviceAndSpanNames().getServiceNames().execute();
serviceCount = serviceNames.size();
return maybeCacheNames(serviceCount > 3, serviceNames);
}

@Get("/api/v2/spans")
@Blocking
public AggregatedHttpResponse getSpanNames(@Param("serviceName") String serviceName)
throws IOException {
List<String> spanNames = storage.serviceAndSpanNames().getSpanNames(serviceName).execute();
return maybeCacheNames(serviceCount > 3, spanNames);
}

@Get("/api/v2/remoteServices")
@Blocking
public AggregatedHttpResponse getRemoteServiceNames(@Param("serviceName") String serviceName)
throws IOException {
List<String> remoteServiceNames =
Expand All @@ -107,6 +112,7 @@ public AggregatedHttpResponse getRemoteServiceNames(@Param("serviceName") String
}

@Get("/api/v2/traces")
@Blocking
public AggregatedHttpResponse getTraces(
@Param("serviceName") Optional<String> serviceName,
@Param("remoteServiceName") Optional<String> remoteServiceName,
Expand Down Expand Up @@ -136,6 +142,7 @@ public AggregatedHttpResponse getTraces(
}

@Get("/api/v2/trace/{traceId}")
@Blocking
public AggregatedHttpResponse getTrace(@Param("traceId") String traceId) throws IOException {
traceId = Span.normalizeTraceId(traceId);
List<Span> trace = storage.traces().getTrace(traceId).execute();
Expand All @@ -146,6 +153,7 @@ public AggregatedHttpResponse getTrace(@Param("traceId") String traceId) throws
}

@Get("/api/v2/traceMany")
@Blocking
public AggregatedHttpResponse getTraces(@Param("traceIds") String traceIds) throws IOException {
if (traceIds.isEmpty()) {
return AggregatedHttpResponse.of(BAD_REQUEST, ANY_TEXT_TYPE, "traceIds parameter is empty");
Expand Down Expand Up @@ -185,11 +193,13 @@ static AggregatedHttpResponse jsonResponse(byte[] body) {
};

@Get("/api/v2/autocompleteKeys")
@Blocking
public AggregatedHttpResponse getAutocompleteKeys() {
return maybeCacheNames(true, autocompleteKeys);
}

@Get("/api/v2/autocompleteValues")
@Blocking
public AggregatedHttpResponse getAutocompleteValues(@Param("key") String key) throws IOException {
List<String> values = storage.autocompleteTags().getValues(key).execute();
return maybeCacheNames(values.size() > 3, values);
Expand Down

0 comments on commit 7d1f9ef

Please sign in to comment.