Skip to content

Commit

Permalink
step #10 add sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidorenkov Anton committed Feb 11, 2024
1 parent 1832069 commit c6abbf7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
id("org.springframework.boot") version "3.2.2"
id("io.spring.dependency-management") version "1.1.4"
id("com.github.ben-manes.versions") version "0.51.0"
id("io.sentry.jvm.gradle") version "4.3.0"
}

group = "hexlet.code"
Expand Down Expand Up @@ -86,4 +87,15 @@ tasks.named<DependencyUpdatesTask>("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(candidate.version)
}
}

sentry {
// Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext = true

org = "sidorenkov-anton"
projectName = "java-spring-boot"
authToken = System.getenv("SENTRY_AUTH_TOKEN")
}
6 changes: 5 additions & 1 deletion src/main/resources/application-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ server:

admin:
email: ${ADMIN_EMAIL:[email protected]}
password: ${ADMIN_PASSWORD:qwerty}
password: ${ADMIN_PASSWORD:qwerty}

sentry:
dsn: https://923653573fe381eb5f20815fd21ea6bd@o4504555492409344.ingest.sentry.io/4506729129836544
traces-sample-rate: 1.0
3 changes: 2 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ label:
admin:
email: [email protected]
password: qwerty

springdoc:
api-docs:
path: /swagger-ui/api-docs
path: /swagger-ui/api-docs

0 comments on commit c6abbf7

Please sign in to comment.