Skip to content

Commit

Permalink
tag 2020.01.09 fixes some naming error to current guides. committer:陈晨。
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmudu committed Jan 9, 2021
1 parent 2ec1aae commit 545219d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
8 changes: 2 additions & 6 deletions otel-simple-webmvc/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
### Open-Telemetry-Simple-Webmvc 案例工程

> Open-Telemetry-Simple-Webmvc 实际测试了 servlet 以及 spring-webmvc。
> Open-Telemetry-Simple-Webmvc 实际测试了 servlet 以及 spring-webmvc,同时如何对方法进行Span增强
##### 测试模块快速开始

1. 确保[Guides 案例工程下的步骤](../README.md)执行完毕。

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. 当你使用想观测
Original file line number Diff line number Diff line change
Expand Up @@ -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 !";
}
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
<version>${lombok.version}</version>
</dependency>

<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>${otel.version}</version>
</dependency>

<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-extension-annotations</artifactId>
Expand Down

0 comments on commit 545219d

Please sign in to comment.