Skip to content

Commit c6b06b8

Browse files
committed
add otel
1 parent 8cc2dbf commit c6b06b8

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

ts-gateway-service/pom.xml

+14
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@
4141
<groupId>com.alibaba.csp</groupId>
4242
<artifactId>sentinel-spring-cloud-gateway-adapter</artifactId>
4343
</dependency>
44+
45+
<dependency>
46+
<groupId>io.opentelemetry.javaagent</groupId>
47+
<artifactId>opentelemetry-javaagent</artifactId>
48+
<version>1.28.0</version>
49+
<scope>compile</scope>
50+
</dependency>
51+
52+
<dependency>
53+
<groupId>io.opentelemetry</groupId>
54+
<artifactId>opentelemetry-sdk</artifactId>
55+
<version>1.45.0</version>
56+
</dependency>
57+
4458
</dependencies>
4559

4660
<build>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package gateway;
2+
3+
import javax.servlet.http.HttpServletResponse;
4+
import org.springframework.web.bind.annotation.GetMapping;
5+
import org.springframework.web.bind.annotation.RestController;
6+
7+
@RestController
8+
public class TestController {
9+
10+
@GetMapping("/api/v1/gateway/test")
11+
public String testEndpoint() {
12+
return "OK";
13+
}
14+
}

0 commit comments

Comments
 (0)