Skip to content

Commit

Permalink
Try other sentry configs
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Dec 15, 2023
1 parent 05cc326 commit 88018a5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ fun main(args: Array<String>) {
}
}

Sentry.captureMessage("Something went wrong2");

try {
throw Exception("This is a test.")
throw Exception("This is a test.2")
} catch (e: Exception) {
Sentry.captureException(e)
}
Expand Down
11 changes: 2 additions & 9 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,34 @@ server.servlet.request.logging.enabled=true
server.servlet.request.logging.level=INFO
logging.level.org.springframework.web=DEBUG
logging.level.org.springframework.security=DEBUG

spring.data.rest.base-path=/api

security.key=somerandomkeywhichislongenoughtoalignwiththejwtspecification

spring.mvc.static-path-pattern=/**
spring.web.resources.static-locations=file:${STATIC_FILES_PATH}

spring.jpa.hibernate.ddl-auto=validate
spring.jpa.show-sql=true
#spring.jpa.properties.hibernate.format_sql=true

# spring.datasource.url=${env.db.url}
spring.datasource.url=jdbc:postgresql://localhost:5432/rapportnavdb?user=postgres&password=postgres
spring.datasource.driver-class-name=org.postgresql.Driver

# database migrations
spring.flyway.enabled=true
spring.flyway.baseline-on-migrate=true
spring.flyway.locations=classpath:/db/migration,classpath:/db/testdata
spring.flyway.out-of-order=true

# GraphQL API
graphql.cors-enabled=true
graphql.cors.allowed-origins=*
graphql.cors.allowed-methods=GET, HEAD, POST
spring.graphql.graphiql.enabled=true
spring.graphql.graphiql.path=/graphiql

# Sentry log & perf tracking
sentry.enabled=true
sentry.dsn=https://[email protected]/121
sentry.exception-resolver-order=-2147483647
sentry.traces-sample-rate=1.0
sentry.environment=integration
sentry.environment=production
sentry.use-git-commit-id-as-release=true
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production.
5 changes: 1 addition & 4 deletions backend/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
<Sentry name="Sentry"
dsn="https://[email protected]/121"
minimumBreadcrumbLevel="DEBUG"
minimumEventLevel="WARN"/>
<Sentry name="Sentry"/>
</Appenders>
<Loggers>
<Root level="info">
Expand Down
7 changes: 2 additions & 5 deletions infra/configurations/backend/application-prod.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@



env.db.url=jdbc:postgresql://db:5432/rapportnavdb?user=postgres&password=postgres
spring.datasource.url=jdbc:postgresql://db:5432/rapportnavdb?user=postgres&password=postgres
host.ip=localhost:8880

#Sentry
sentry.enabled=true
sentry.dsn=https://[email protected]/121
sentry.exception-resolver-order=-2147483647
sentry.traces-sample-rate=1.0
sentry.environment=integration
sentry.environment=production

0 comments on commit 88018a5

Please sign in to comment.