13
.travis.yml
13
.travis.yml
@@ -1,12 +1,7 @@
|
||||
language: java
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
# To use the more powerful, GCE-powered trusty, which also has a newer JDK!
|
||||
# See https://docs.travis-ci.com/user/trusty-ci-environment/
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services:
|
||||
- docker
|
||||
sudo: false
|
||||
before_install:
|
||||
- git config user.name "$GIT_NAME"
|
||||
- git config user.email "$GIT_EMAIL"
|
||||
@@ -17,8 +12,8 @@ install:
|
||||
- ./mvnw install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
|
||||
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then ./docs/src/main/asciidoc/ghpages.sh; fi'
|
||||
script:
|
||||
- '[ "${TRAVIS_PULL_REQUEST}" != "false" ] || ./mvnw -s .settings.xml deploy -nsu -Dmaven.test.redirectTestOutputToFile=true'
|
||||
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] || ./mvnw install -nsu -Dmaven.test.redirectTestOutputToFile=true'
|
||||
- '[ "${TRAVIS_PULL_REQUEST}" != "false" ] || ./mvnw -s .settings.xml deploy -nsu'
|
||||
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] || ./mvnw install -nsu'
|
||||
env:
|
||||
global:
|
||||
- GIT_NAME="Spencer Gibb"
|
||||
@@ -26,4 +21,4 @@ env:
|
||||
- CI_DEPLOY_USERNAME=sgibb
|
||||
- secure: dxec/7oFht2WMaw4GNFNvuWHlnkm1wmFagE3ZrtCcU2SHUW/P2FgG5tiNW9hT2eXHf2H0YUF1ROkL4BrH5qpIlOBtYd0J8Q/67vBqyB112IN2FqoB/F6Erkfp1FKMBBrXXYaGoSvqzmJs6zqS3JRpyr010W2aU8klK0QfqRoJ0g=
|
||||
- TERM=dumb
|
||||
- DOCKER_HOST=tcp://127.0.0.1:2375
|
||||
|
||||
|
||||
1
pom.xml
1
pom.xml
@@ -159,7 +159,6 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<properties>
|
||||
<spock.version>1.0-groovy-2.4</spock.version>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.testTarget>1.8</maven.compiler.testTarget>
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.cloud.sleuth.TraceManager;
|
||||
import org.springframework.cloud.sleuth.event.ServerReceivedEvent;
|
||||
import org.springframework.cloud.sleuth.event.ServerSentEvent;
|
||||
import org.springframework.cloud.sleuth.sampler.IsTracingSampler;
|
||||
import org.springframework.cloud.sleuth.trace.TraceContextHolder;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.ApplicationEventPublisherAware;
|
||||
@@ -90,6 +91,7 @@ public class TraceFilter extends OncePerRequestFilter
|
||||
protected void doFilterInternal(HttpServletRequest request,
|
||||
HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
TraceContextHolder.removeCurrentTrace();
|
||||
|
||||
String uri = this.urlPathHelper.getPathWithinApplication(request);
|
||||
boolean skip = this.skipPattern.matcher(uri).matches()
|
||||
@@ -117,6 +119,8 @@ public class TraceFilter extends OncePerRequestFilter
|
||||
String parentName = getHeader(request, response, Trace.SPAN_NAME_NAME);
|
||||
if (parentName != null) {
|
||||
span.name(parentName);
|
||||
} else {
|
||||
span.name("parent/" + name);
|
||||
}
|
||||
if (processId != null) {
|
||||
span.processId(processId);
|
||||
|
||||
@@ -19,7 +19,6 @@ import io.zipkin.server.ZipkinServer;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
@@ -37,7 +36,6 @@ import tools.AbstractIntegrationTest;
|
||||
@WebIntegrationTest
|
||||
@TestPropertySource(properties="sample.zipkin.enabled=true")
|
||||
@Slf4j
|
||||
@Ignore("Not passing beacuse of 400 from query")
|
||||
public class ZipkinTests extends AbstractIntegrationTest {
|
||||
|
||||
private static final String APP_NAME = "testsleuthzipkin";
|
||||
|
||||
Reference in New Issue
Block a user