Commit 2f5b7069 by 丁伟峰

加上sentry的配置,配置的方式,有待优化

1 parent f9d2fbf4
......@@ -71,7 +71,7 @@
<artifactId>project-interface</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
......@@ -80,7 +80,13 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>6.17.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
......@@ -89,4 +95,4 @@
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
</project>
......@@ -16,6 +16,7 @@
package com.alibaba.cloud.integration.order;
import io.sentry.Sentry;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
......@@ -29,6 +30,15 @@ public class OrderServiceApplication {
public static void main(String[] args) {
SpringApplication.run(OrderServiceApplication.class, args);
// todo 配置化
Sentry.init(options -> {
options.setDsn("http://85293a9310fc4a8187422a7a257fc1ba@sentry.1888w.cn/8");
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.setTracesSampleRate(1.0);
// When first trying Sentry it's good to see what the SDK is doing:
options.setDebug(true);
});
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!