This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-spring-boot-examples.git
commit ca5295202318c8931848799329b0ee810657674f Author: Andrii Mealshchenko <javat...@gmail.com> AuthorDate: Fri Sep 18 09:14:28 2020 +0300 Code cleanup --- camel-example-spring-boot-apm-opentracing/pom.xml | 8 -------- .../src/main/java/sample/camel/CamelConfig.java | 16 ++++++++++++++++ .../src/main/java/sample/camel/Service1Application.java | 4 +--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/camel-example-spring-boot-apm-opentracing/pom.xml b/camel-example-spring-boot-apm-opentracing/pom.xml index b6dfd34..11c9102 100644 --- a/camel-example-spring-boot-apm-opentracing/pom.xml +++ b/camel-example-spring-boot-apm-opentracing/pom.xml @@ -91,14 +91,6 @@ <artifactId>spring-boot-starter-web</artifactId> </dependency> - <!-- CDI API --> - <dependency> - <groupId>javax.enterprise</groupId> - <artifactId>cdi-api</artifactId> - <version>${cdi-api-2.0-version}</version> - <scope>provided</scope> - </dependency> - <!-- elastico --> <dependency> <groupId>co.elastic.apm</groupId> diff --git a/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/CamelConfig.java b/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/CamelConfig.java index 6c5f875..d4535d5 100644 --- a/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/CamelConfig.java +++ b/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/CamelConfig.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ package sample.camel; import co.elastic.apm.opentracing.ElasticApmTracer; diff --git a/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/Service1Application.java b/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/Service1Application.java index 52c4f9c..aef6154 100644 --- a/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/Service1Application.java +++ b/camel-example-spring-boot-apm-opentracing/src/main/java/sample/camel/Service1Application.java @@ -25,6 +25,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * A Spring Boot application that starts the Camel OpenTracing application. * <p/> * Notice we use the `@CamelOpenTracing` annotation to enable Camel with OpenTracing. + * Also we start APM Agent with `ElasticApmAttacher.attach()` */ @SpringBootApplication @CamelOpenTracing @@ -32,11 +33,8 @@ public class Service1Application { /** * A main method to start this application. */ - public static void main(String[] args) { ElasticApmAttacher.attach(); SpringApplication.run(Service1Application.class, args); } - - }