From 545219d0f6e1bfb39a311b01f038e7942ff762cd Mon Sep 17 00:00:00 2001 From: chenchen Date: Sat, 9 Jan 2021 23:15:13 +0800 Subject: [PATCH] =?UTF-8?q?tag=202020.01.09=20fixes=20some=20naming=20erro?= =?UTF-8?q?r=20to=20current=20guides.=20committer=EF=BC=9A=E9=99=88?= =?UTF-8?q?=E6=99=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OtelTestSpringDataController.java | 2 +- .../otel/webflux/web/OtelTestWebFluxController.java | 2 +- otel-simple-webmvc/README.md | 8 ++------ .../webmvc/controller/OtelTestSpringMvcController.java | 6 +++--- pom.xml | 6 ++++++ 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/otel-simple-spring-data/src/main/java/org/chenmudu/otel/springdata/controller/OtelTestSpringDataController.java b/otel-simple-spring-data/src/main/java/org/chenmudu/otel/springdata/controller/OtelTestSpringDataController.java index 9ba01e2..7ab8704 100644 --- a/otel-simple-spring-data/src/main/java/org/chenmudu/otel/springdata/controller/OtelTestSpringDataController.java +++ b/otel-simple-spring-data/src/main/java/org/chenmudu/otel/springdata/controller/OtelTestSpringDataController.java @@ -53,7 +53,7 @@ public class OtelTestSpringDataController { @GetMapping("/springData") public String springData() { - log.info("OtelTestSpringMvcController hello started!"); + log.info("OtelTestSpringMvcController springData started!"); // this.dataMongoTest(); // this.dataRedisTest(); // this.dataJdbcTest(); diff --git a/otel-simple-webflux/src/main/java/org/chenmudu/otel/webflux/web/OtelTestWebFluxController.java b/otel-simple-webflux/src/main/java/org/chenmudu/otel/webflux/web/OtelTestWebFluxController.java index d18ca32..f9554dd 100644 --- a/otel-simple-webflux/src/main/java/org/chenmudu/otel/webflux/web/OtelTestWebFluxController.java +++ b/otel-simple-webflux/src/main/java/org/chenmudu/otel/webflux/web/OtelTestWebFluxController.java @@ -31,7 +31,7 @@ public class OtelTestWebFluxController { /** * io.opentelemetry.javaagent.netty(servlet 容器变成了netty 容器。) - * io.opentelemetry.javaagent.spring-webflux (web-mvc变成了webflus) + * io.opentelemetry.javaagent.spring-webflux (web-mvc变成了webflux) * * @return string. */ diff --git a/otel-simple-webmvc/README.md b/otel-simple-webmvc/README.md index e2e1ca2..f040a2e 100644 --- a/otel-simple-webmvc/README.md +++ b/otel-simple-webmvc/README.md @@ -1,6 +1,6 @@ ### Open-Telemetry-Simple-Webmvc 案例工程 -> Open-Telemetry-Simple-Webmvc 实际测试了 servlet 以及 spring-webmvc。 +> Open-Telemetry-Simple-Webmvc 实际测试了 servlet 以及 spring-webmvc,同时如何对方法进行Span增强。 ##### 测试模块快速开始 @@ -8,10 +8,6 @@ 2. 启动此模块[otel-simple-webmvc](https://github.com/chenmudu/open-telemetry-java-guides/tree/master/otel-simple-webmvc/src/main/java/org/chenmudu/otel/webmvc)下的WebMvcRunMain. -3. 访问http://localhost:10001/hello。 +3. 访问http://localhost:10001/webmvc。 4. Copy Console 中的 TraceId访问 http://localhost:16686/ 即可观测结果。 - -##### 注意 - -1. 当你使用想观测 \ No newline at end of file diff --git a/otel-simple-webmvc/src/main/java/org/chenmudu/otel/webmvc/controller/OtelTestSpringMvcController.java b/otel-simple-webmvc/src/main/java/org/chenmudu/otel/webmvc/controller/OtelTestSpringMvcController.java index 9fce068..51b8a7a 100644 --- a/otel-simple-webmvc/src/main/java/org/chenmudu/otel/webmvc/controller/OtelTestSpringMvcController.java +++ b/otel-simple-webmvc/src/main/java/org/chenmudu/otel/webmvc/controller/OtelTestSpringMvcController.java @@ -29,9 +29,9 @@ @RestController public class OtelTestSpringMvcController { - @GetMapping("/hello") - public String hello() { - log.info("OtelTestSpringMvcController hello started!"); + @GetMapping("/webmvc") + public String webmvc() { + log.info("OtelTestSpringMvcController webmvc started!"); this.calledHi(); return "OtelTestSpringMvcController hello !"; } diff --git a/pom.xml b/pom.xml index f3d4fd8..1586acf 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,12 @@ ${lombok.version} + + io.opentelemetry + opentelemetry-api + ${otel.version} + + io.opentelemetry opentelemetry-extension-annotations