diff --git a/.travis.yml b/.travis.yml index 1dfe611681..8be4af030c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +sudo: true +services: + - docker language: java jdk: - oraclejdk9 diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml index b2584b1aaf..4222592082 100644 --- a/apm-agent-core/pom.xml +++ b/apm-agent-core/pom.xml @@ -3,7 +3,6 @@ 4.0.0 true - 3.9.1 @@ -63,12 +62,12 @@ com.squareup.okhttp3 okhttp - ${okhttp.version} + ${version.okhttp} com.squareup.okhttp3 logging-interceptor - ${okhttp.version} + ${version.okhttp} com.lmax diff --git a/apm-agent-core/src/main/java/co/elastic/apm/report/ApmServerReporter.java b/apm-agent-core/src/main/java/co/elastic/apm/report/ApmServerReporter.java index 7ab619497f..85179c370d 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/report/ApmServerReporter.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/report/ApmServerReporter.java @@ -72,6 +72,7 @@ public void translateTo(ReportingEvent event, long sequence, ErrorCapture error) private final AtomicInteger dropped = new AtomicInteger(); private final boolean dropTransactionIfQueueFull; private final ReportingEventHandler reportingEventHandler; + private final boolean syncReport; @Nullable private ScheduledThreadPoolExecutor flushScheduler; @@ -79,6 +80,7 @@ public ApmServerReporter(Service service, ProcessInfo process, SystemInfo system boolean dropTransactionIfQueueFull, ReporterConfiguration reporterConfiguration, ProcessorEventHandler processorEventHandler) { this.dropTransactionIfQueueFull = dropTransactionIfQueueFull; + this.syncReport = reporterConfiguration.isReportSynchronously(); disruptor = new Disruptor<>(new TransactionEventFactory(), MathUtils.getNextPowerOf2(reporterConfiguration.getMaxQueueSize()), new ThreadFactory() { @Override public Thread newThread(Runnable r) { @@ -109,6 +111,17 @@ public void report(Transaction transaction) { if (!tryAddEventToRingBuffer(transaction, TRANSACTION_EVENT_TRANSLATOR)) { transaction.recycle(); } + if (syncReport) { + waitForFlush(); + } + } + + private void waitForFlush() { + try { + flush().get(); + } catch (Exception e) { + throw new RuntimeException(e); + } } @Override @@ -185,6 +198,9 @@ public void report(ErrorCapture error) { if (!tryAddEventToRingBuffer(error, ERROR_EVENT_TRANSLATOR)) { error.recycle(); } + if (syncReport) { + waitForFlush(); + } } private boolean tryAddEventToRingBuffer(E event, EventTranslatorOneArg eventTranslator) { diff --git a/apm-agent-core/src/main/java/co/elastic/apm/report/ReporterConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/report/ReporterConfiguration.java index e0f8a84c74..61cf04537d 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/report/ReporterConfiguration.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/report/ReporterConfiguration.java @@ -25,9 +25,6 @@ import javax.annotation.Nullable; import java.net.URL; -import java.util.Collection; -import java.util.Collections; -import java.util.List; public class ReporterConfiguration extends ConfigurationOptionProvider { public static final String REPORTER_CATEGORY = "Reporter"; @@ -45,6 +42,7 @@ public class ReporterConfiguration extends ConfigurationOptionProvider { .configurationCategory(REPORTER_CATEGORY) .label("The URL for your APM Server") .description("The URL must be fully qualified, including protocol (http or https) and port.") + .dynamic(true) .buildWithDefault(UrlValueConverter.INSTANCE.convert("http://localhost:8200")); private final ConfigurationOption serverTimeout = ConfigurationOption.integerOption() @@ -85,6 +83,14 @@ public class ReporterConfiguration extends ConfigurationOptionProvider { .dynamic(true) .buildWithDefault(500); + private final ConfigurationOption reportSynchronously = ConfigurationOption.booleanOption() + .key("report_sync") + .tags("internal") + .configurationCategory(REPORTER_CATEGORY) + .description("Only to be used for testing purposes. " + + "Blocks the requests until the transaction has been reported to the APM server.") + .buildWithDefault(false); + @Nullable public String getSecretToken() { return secretToken.get(); @@ -109,4 +115,8 @@ public int getFlushInterval() { public int getMaxQueueSize() { return maxQueueSize.get(); } + + public boolean isReportSynchronously() { + return reportSynchronously.get(); + } } diff --git a/apm-agent-core/src/main/java/co/elastic/apm/report/ReportingEventHandler.java b/apm-agent-core/src/main/java/co/elastic/apm/report/ReportingEventHandler.java index 68c1d3190b..df577de080 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/report/ReportingEventHandler.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/report/ReportingEventHandler.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,12 +26,15 @@ import co.elastic.apm.impl.payload.SystemInfo; import co.elastic.apm.impl.payload.TransactionPayload; import com.lmax.disruptor.EventHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static co.elastic.apm.report.ReportingEvent.ReportingEventType.ERROR; import static co.elastic.apm.report.ReportingEvent.ReportingEventType.FLUSH; import static co.elastic.apm.report.ReportingEvent.ReportingEventType.TRANSACTION; class ReportingEventHandler implements EventHandler { + private static final Logger logger = LoggerFactory.getLogger(ReportingEventHandler.class); private final TransactionPayload transactionPayload; private final ErrorPayload errorPayload; private final PayloadSender payloadSender; @@ -46,6 +49,7 @@ public ReportingEventHandler(Service service, ProcessInfo process, SystemInfo sy @Override public void onEvent(ReportingEvent event, long sequence, boolean endOfBatch) { + logger.debug("Receiving {} event (sequence {})", event.getType(), sequence); if (event.getType() == FLUSH) { flush(transactionPayload); flush(errorPayload); @@ -63,6 +67,7 @@ public void onEvent(ReportingEvent event, long sequence, boolean endOfBatch) { flush(errorPayload); } } + logger.debug("Finished processing {} event (sequence {})", event.getType(), sequence); event.resetState(); } diff --git a/apm-agent-core/src/test/resources/logback-test.xml b/apm-agent-core/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..1e9838e48e --- /dev/null +++ b/apm-agent-core/src/test/resources/logback-test.xml @@ -0,0 +1,17 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + diff --git a/apm-agent-java/src/test/resources/configuration.asciidoc.ftl b/apm-agent-java/src/test/resources/configuration.asciidoc.ftl index 4a3a2aa64b..b9e7b496cd 100644 --- a/apm-agent-java/src/test/resources/configuration.asciidoc.ftl +++ b/apm-agent-java/src/test/resources/configuration.asciidoc.ftl @@ -36,6 +36,7 @@ application_packages=org.example [[${category?lower_case?replace(" ", "-")}]] === ${category} configuration options <#list options as option> + <#if !option.tags?seq_contains("internal")> [float] [[config-${option.key?replace("[^a-z]", "-", "r")}]] ==== `${option.key}` @@ -56,6 +57,7 @@ ${option.description} | `elastic.apm.${option.key}` | `ELASTIC_APM_${option.key?upper_case}` | `${option.key}` |============ + diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index 3bce4b9760..76c1119cc7 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -343,7 +343,7 @@ The URL must be fully qualified, including protocol (http or https) and port. [options="header"] |============ | Default | Type | Dynamic -| `pass:[http://localhost:8200]` | URL | false +| `pass:[http://localhost:8200]` | URL | true |============ diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml new file mode 100644 index 0000000000..c28504e041 --- /dev/null +++ b/integration-tests/pom.xml @@ -0,0 +1,23 @@ + + + + apm-agent-parent + co.elastic.apm + 0.1.3-SNAPSHOT + + 4.0.0 + + integration-tests + pom + ${project.groupId}:${project.artifactId} + + simple-webapp + simple-webapp-integration-test + + + true + + + diff --git a/integration-tests/simple-webapp-integration-test/pom.xml b/integration-tests/simple-webapp-integration-test/pom.xml new file mode 100644 index 0000000000..3bda4321e8 --- /dev/null +++ b/integration-tests/simple-webapp-integration-test/pom.xml @@ -0,0 +1,73 @@ + + + + + integration-tests + co.elastic.apm + 0.1.3-SNAPSHOT + + 4.0.0 + + simple-webapp-integration-test + + ${project.groupId}:${project.artifactId} + + + + ${project.groupId} + simple-webapp + ${project.version} + war + + + ${project.groupId} + apm-agent-core + ${project.version} + + + com.squareup.okhttp3 + okhttp + ${version.okhttp} + + + com.squareup.okhttp3 + logging-interceptor + ${version.okhttp} + + + ch.qos.logback + logback-classic + ${version.logback} + + + org.testcontainers + testcontainers + 1.7.2 + test + + + org.mock-server + mockserver-client-java + 5.3.0 + test + + + com.networknt + json-schema-validator + ${version.json-schema-validator} + test + + + + com.fasterxml.jackson.core + jackson-databind + + + + + + diff --git a/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/AbstractTomcatIntegrationTest.java b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/AbstractTomcatIntegrationTest.java new file mode 100644 index 0000000000..1c212bfdcb --- /dev/null +++ b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/AbstractTomcatIntegrationTest.java @@ -0,0 +1,129 @@ +/*- + * #%L + * Elastic APM Java agent + * %% + * Copyright (C) 2018 the original author or authors + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ +package co.elastic.apm.servlet; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.networknt.schema.JsonSchema; +import com.networknt.schema.JsonSchemaFactory; +import com.networknt.schema.ValidationMessage; +import okhttp3.OkHttpClient; +import okhttp3.logging.HttpLoggingInterceptor; +import org.junit.BeforeClass; +import org.mockserver.model.HttpRequest; +import org.mockserver.model.HttpResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.Network; +import org.testcontainers.images.builder.ImageFromDockerfile; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockserver.model.HttpRequest.request; + +/** + * When you want to execute the test in the IDE, execute {@code mvn clean package} before. + * This creates the {@code ROOT.war} file, + * which is bound into the docker container. + *

+ * Whenever you make changes to the application, + * you have to rerun {@code mvn clean package}. + *

+ *

+ * To debug simple-webapp which is deployed to tomcat, + * add a break point in {@link #beforeClass()} and evaluate tomcatContainer.getMappedPort(8000). + * Then create a remote debug configuration in IntelliJ using this port and start debugging. + * TODO use {@link org.testcontainers.containers.SocatContainer} to always have the same debugging port + *

+ */ +public abstract class AbstractTomcatIntegrationTest { + + private static final Logger logger = LoggerFactory.getLogger(ServletIntegrationTest.class); + + private static final String pathToWar = "../simple-webapp/target/ROOT.war"; + protected static GenericContainer tomcatContainer = new GenericContainer<>( + new ImageFromDockerfile() + .withDockerfileFromBuilder(builder -> builder + .from("tomcat:8") + .env("JPDA_ADDRESS", "8000") + .env("JPDA_TRANSPORT", "dt_socket") + .run("rm -rf /usr/local/tomcat/webapps/*") + .expose(8080, 8000) + .entryPoint("catalina.sh", "jpda", "run"))) + .withNetwork(Network.SHARED) + .withEnv("ELASTIC_APM_SERVER_URL", "http://apm-server:1080") + .withEnv("ELASTIC_APM_SERVICE_NAME", "servlet-test-app") + .withEnv("ELASTIC_APM_IGNORE_URLS", "/status*,/favicon.ico") + .withEnv("ELASTIC_APM_REPORT_SYNC", "true") + .withLogConsumer(new StandardOutLogConsumer().withPrefix("tomcat")) + .withFileSystemBind(pathToWar, "/usr/local/tomcat/webapps/ROOT.war") + .withExposedPorts(8080, 8000); + protected static MockServerContainer mockServerContainer = new MockServerContainer() + .withNetworkAliases("apm-server") + .withNetwork(Network.SHARED); + protected static OkHttpClient httpClient; + private static JsonSchema schema; + + static { + final File warFile = new File(pathToWar); + logger.info("Check file {}", warFile.getAbsolutePath()); + assertThat(warFile).exists(); + assertThat(warFile).isFile(); + assertThat(warFile.length()).isGreaterThan(0); + Stream.of(tomcatContainer, mockServerContainer).parallel().forEach(GenericContainer::start); + } + + @BeforeClass + public static void beforeClass() { + mockServerContainer.getClient().when(request("/v1/transactions")).respond(HttpResponse.response().withStatusCode(200)); + mockServerContainer.getClient().when(request("/v1/errors")).respond(HttpResponse.response().withStatusCode(200)); + schema = JsonSchemaFactory.getInstance().getSchema( + AbstractTomcatIntegrationTest.class.getResourceAsStream("/schema/transactions/payload.json")); + final HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(logger::info); + loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); + httpClient = new OkHttpClient.Builder().addInterceptor(loggingInterceptor).build(); + } + + protected List getReportedTransactions() throws IOException { + final List transactions = new ArrayList<>(); + final ObjectMapper objectMapper = new ObjectMapper(); + for (HttpRequest httpRequest : mockServerContainer.getClient().retrieveRecordedRequests(request("/v1/transactions"))) { + final JsonNode payload = objectMapper.readTree(httpRequest.getBodyAsString()); + validateJsonSchema(payload); + for (JsonNode transaction : payload.get("transactions")) { + transactions.add(transaction); + } + } + return transactions; + } + + private void validateJsonSchema(JsonNode payload) { + Set errors = schema.validate(payload); + assertThat(errors).isEmpty(); + } + +} diff --git a/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/MockServerContainer.java b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/MockServerContainer.java new file mode 100644 index 0000000000..02c4a697f2 --- /dev/null +++ b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/MockServerContainer.java @@ -0,0 +1,52 @@ +/*- + * #%L + * Elastic APM Java agent + * %% + * Copyright (C) 2018 the original author or authors + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ +package co.elastic.apm.servlet; + +import com.github.dockerjava.api.command.InspectContainerResponse; +import org.mockserver.client.server.MockServerClient; +import org.slf4j.LoggerFactory; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.output.Slf4jLogConsumer; + +/** + * Acts as a mock for the APM-server. + * It stores the {@link co.elastic.apm.impl.payload.Payload}s sent to it, + * which can be retrieved via the {@link #client}. + */ +public class MockServerContainer extends GenericContainer { + + private MockServerClient client; + + public MockServerContainer() { + super("jamesdbloom/mockserver:mockserver-5.3.0"); + addExposedPorts(1080); + withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger(getClass()))); + } + + @Override + protected void containerIsStarted(InspectContainerResponse containerInfo) { + super.containerIsStarted(containerInfo); + client = new MockServerClient(getContainerIpAddress(), getFirstMappedPort()); + } + + public MockServerClient getClient() { + return client; + } +} diff --git a/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/ServletIntegrationTest.java b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/ServletIntegrationTest.java new file mode 100644 index 0000000000..a53e22abb4 --- /dev/null +++ b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/ServletIntegrationTest.java @@ -0,0 +1,53 @@ +/*- + * #%L + * Elastic APM Java agent + * %% + * Copyright (C) 2018 the original author or authors + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ +package co.elastic.apm.servlet; + +import com.fasterxml.jackson.databind.JsonNode; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.junit.Test; + +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +public class ServletIntegrationTest extends AbstractTomcatIntegrationTest { + + @Test + public void testTransactionReporting() throws Exception { + final Response response = httpClient.newCall(new Request.Builder() + .get() + .url("http://" + tomcatContainer.getContainerIpAddress() + ":" + tomcatContainer.getMappedPort(8080) + "/index.jsp") + .build()) + .execute(); + + assertThat(response.code()).withFailMessage(response.toString()).isEqualTo(200); + final ResponseBody responseBody = response.body(); + assertThat(responseBody).isNotNull(); + assertThat(responseBody.string()).contains("Hello World"); + + final List reportedTransactions = getReportedTransactions(); + assertThat(reportedTransactions.size()).isEqualTo(1); + assertThat(reportedTransactions.iterator().next().get("context").get("request").get("url").get("pathname").textValue()) + .isEqualTo("/index.jsp"); + } + +} diff --git a/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/StandardOutLogConsumer.java b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/StandardOutLogConsumer.java new file mode 100644 index 0000000000..572e913423 --- /dev/null +++ b/integration-tests/simple-webapp-integration-test/src/test/java/co/elastic/apm/servlet/StandardOutLogConsumer.java @@ -0,0 +1,65 @@ +/*- + * #%L + * Elastic APM Java agent + * %% + * Copyright (C) 2018 the original author or authors + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ +package co.elastic.apm.servlet; + +import org.testcontainers.containers.output.OutputFrame; + +import java.util.function.Consumer; +import java.util.regex.Pattern; + +public class StandardOutLogConsumer implements Consumer { + private static final Pattern ANSI_CODE_PATTERN = Pattern.compile("\\[\\d[ABCD]"); + private String prefix = ""; + + public StandardOutLogConsumer() { + } + + public StandardOutLogConsumer withPrefix(String prefix) { + this.prefix = "[" + prefix + "] "; + return this; + } + + @Override + public void accept(OutputFrame outputFrame) { + if (outputFrame != null) { + String utf8String = outputFrame.getUtf8String(); + + if (utf8String != null) { + OutputFrame.OutputType outputType = outputFrame.getType(); + String message = utf8String.trim(); + + if (ANSI_CODE_PATTERN.matcher(message).matches()) { + return; + } + + switch (outputType) { + case END: + break; + case STDOUT: + case STDERR: + System.out.println(String.format("%s%s", prefix, message)); + break; + default: + throw new IllegalArgumentException("Unexpected outputType " + outputType); + } + } + } + } +} diff --git a/integration-tests/simple-webapp-integration-test/src/test/resources/logback-test.xml b/integration-tests/simple-webapp-integration-test/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..9c263a5e79 --- /dev/null +++ b/integration-tests/simple-webapp-integration-test/src/test/resources/logback-test.xml @@ -0,0 +1,21 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + diff --git a/integration-tests/simple-webapp/pom.xml b/integration-tests/simple-webapp/pom.xml new file mode 100644 index 0000000000..9aebb9068c --- /dev/null +++ b/integration-tests/simple-webapp/pom.xml @@ -0,0 +1,50 @@ + + + + + integration-tests + co.elastic.apm + 0.1.3-SNAPSHOT + + 4.0.0 + + simple-webapp + war + + ${project.groupId}:${project.artifactId} + + + ROOT + + + + + ${project.groupId} + apm-agent-java + ${project.version} + + + + * + * + + + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + ch.qos.logback + logback-classic + ${version.logback} + + + + diff --git a/integration-tests/simple-webapp/src/main/resources/logback.xml b/integration-tests/simple-webapp/src/main/resources/logback.xml new file mode 100644 index 0000000000..1bda817239 --- /dev/null +++ b/integration-tests/simple-webapp/src/main/resources/logback.xml @@ -0,0 +1,18 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/integration-tests/simple-webapp/src/main/webapp/WEB-INF/web.xml b/integration-tests/simple-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..4cd4e4a91a --- /dev/null +++ b/integration-tests/simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,15 @@ + + + + Simple Web App + + ApmFilter + co.elastic.apm.servlet.ApmFilter + + + ApmFilter + /* + + diff --git a/integration-tests/simple-webapp/src/main/webapp/index.jsp b/integration-tests/simple-webapp/src/main/webapp/index.jsp new file mode 100644 index 0000000000..c38169bb95 --- /dev/null +++ b/integration-tests/simple-webapp/src/main/webapp/index.jsp @@ -0,0 +1,5 @@ + + +

Hello World!

+ + diff --git a/integration-tests/simple-webapp/src/main/webapp/status.jsp b/integration-tests/simple-webapp/src/main/webapp/status.jsp new file mode 100644 index 0000000000..d86bac9de5 --- /dev/null +++ b/integration-tests/simple-webapp/src/main/webapp/status.jsp @@ -0,0 +1 @@ +OK diff --git a/pom.xml b/pom.xml index 828ca20c60..890d63de56 100644 --- a/pom.xml +++ b/pom.xml @@ -44,8 +44,13 @@ 7 9 false - 2.9.4 - 5.1.0 + + 2.9.2 + 5.1.1 + 4.12 1.7.25 2.2.0 true @@ -60,6 +65,11 @@ 5.0.4.RELEASE 1.4.196 9.4.8.v20171121 + 2.19.1 + 5.1.1 + 1.2.3 + 0.1.19 + 3.9.1 @@ -69,6 +79,7 @@ apm-agent-plugins apm-agent-api apm-opentracing + integration-tests @@ -301,7 +312,7 @@ maven-surefire-plugin - 2.19.1 + ${version.plugin.surefire} true false @@ -310,12 +321,17 @@ org.junit.platform junit-platform-surefire-provider - 1.0.3 + 1.1.1 + + + org.junit.vintage + junit-vintage-engine + ${version.junit-vintage-engine} org.junit.jupiter junit-jupiter-engine - ${junit.version} + ${version.junit-jupiter} @@ -403,13 +419,20 @@ org.junit.jupiter junit-jupiter-api - ${junit.version} + ${version.junit-jupiter} test org.junit.jupiter junit-jupiter-params - ${junit.version} + ${version.junit-jupiter} + test + + + + junit + junit + ${version.junit.vintage} test @@ -425,15 +448,15 @@ test - org.slf4j - slf4j-simple - ${slf4j.version} + ch.qos.logback + logback-classic + ${version.logback} test com.networknt json-schema-validator - 0.1.16 + ${version.json-schema-validator} test