Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2f5b7069
authored
Jun 13, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加上sentry的配置,配置的方式,有待优化
1 parent
f9d2fbf4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
project-order/pom.xml
project-order/src/main/java/com/alibaba/cloud/integration/order/OrderServiceApplication.java
project-order/pom.xml
View file @
2f5b706
...
...
@@ -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>
project-order/src/main/java/com/alibaba/cloud/integration/order/OrderServiceApplication.java
View file @
2f5b706
...
...
@@ -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
);
});
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment