-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Sentry monitoring #387
Open
pvannierop
wants to merge
13
commits into
dev
Choose a base branch
from
feature/sentry
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1041404
Remove snapshot versions
Bdegraaf1234 fc2972e
Merge pull request #379 from RADAR-base/release-0.8.10
Bdegraaf1234 81f7282
Configure using github secret for snapshot publishing
Bdegraaf1234 4ded363
bump version for release
yatharthranjan 58655e0
Merge branch 'master' into release-0.8.11
yatharthranjan 08e1807
Run Snyk on release branches
pvannierop d3e9af7
Up avro to 1.11.4
pvannierop b74f887
Merge pull request #389 from RADAR-base/security/upgrade
pvannierop 4a72e25
Merge pull request #386 from RADAR-base/release-0.8.11
pvannierop b4c9628
Update scheduled_snyk.yaml
pvannierop 233ea1e
Up gradle version to 8.9
pvannierop 2e4891b
Refactor gradle configuration
pvannierop 2c4947d
Add support for Sentry monitoring
pvannierop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ on: | |
pull_request: | ||
branches: | ||
- master | ||
- release-* | ||
|
||
jobs: | ||
security: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,10 @@ | ||
import org.radarbase.gradle.plugin.radarKotlin | ||
import org.radarbase.gradle.plugin.radarPublishing | ||
|
||
plugins { | ||
id("org.radarbase.radar-root-project") version Versions.radarCommons | ||
id("org.radarbase.radar-dependency-management") version Versions.radarCommons | ||
id("org.radarbase.radar-kotlin") version Versions.radarCommons apply false | ||
id("org.radarbase.radar-publishing") version Versions.radarCommons apply false | ||
id("com.github.davidmc24.gradle.plugin.avro-base") version Versions.avroGenerator apply false | ||
kotlin("plugin.allopen") version Versions.kotlin apply false | ||
id("org.radarbase.radar-root-project") | ||
id("org.radarbase.radar-dependency-management") | ||
id("org.radarbase.radar-kotlin") | ||
} | ||
|
||
radarRootProject { | ||
projectVersion.set(Versions.project) | ||
gradleVersion.set(Versions.gradle) | ||
} | ||
|
||
// Configuration | ||
val githubRepoName = "RADAR-base/RADAR-Schemas" | ||
val githubUrl = "https://github.com/${githubRepoName}.git" | ||
val githubIssueUrl = "https://github.com/$githubRepoName/issues" | ||
|
||
subprojects { | ||
apply(plugin = "org.radarbase.radar-kotlin") | ||
|
||
repositories{ | ||
mavenCentral() | ||
gradlePluginPortal() | ||
maven(url = "https://jitpack.io") | ||
} | ||
|
||
radarKotlin { | ||
javaVersion.set(Versions.java) | ||
kotlinVersion.set(Versions.kotlin) | ||
slf4jVersion.set(Versions.slf4j) | ||
log4j2Version.set(Versions.log4j2) | ||
junitVersion.set(Versions.junit) | ||
} | ||
|
||
afterEvaluate { | ||
configurations.all { | ||
exclude(group = "org.slf4j", module = "slf4j-log4j12") | ||
} | ||
} | ||
} | ||
|
||
// Configure applications | ||
configure(listOf( | ||
project(":radar-schemas-tools"), | ||
project(":radar-catalog-server"), | ||
)) { | ||
apply(plugin = "application") | ||
} | ||
|
||
// Configure libraries | ||
configure(listOf( | ||
project(":radar-schemas-commons"), | ||
project(":radar-schemas-core"), | ||
project(":radar-schemas-registration") | ||
)) { | ||
apply(plugin = "java-library") | ||
apply(plugin = "org.radarbase.radar-kotlin") | ||
apply(plugin = "org.radarbase.radar-publishing") | ||
|
||
radarKotlin { | ||
javaVersion.set(Versions.java) | ||
} | ||
|
||
radarPublishing { | ||
githubUrl.set("https://github.com/$githubRepoName") | ||
developers { | ||
developer { | ||
id.set("bdegraaf1234") | ||
name.set("Bastiaan de Graaf") | ||
email.set("[email protected]") | ||
organization.set("The Hyve") | ||
} | ||
developer { | ||
id.set("nivemaham") | ||
name.set("Nivethika Mahasivam") | ||
email.set("[email protected]") | ||
organization.set("The Hyve") | ||
} | ||
} | ||
} | ||
projectVersion.set(properties["projectVersion"] as String) | ||
gradleVersion.set(libs.versions.gradle) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
dependencyResolutionManagement { | ||
// Allows to use the version catalog in the buildSrc module | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
java-sdk/buildSrc/src/main/kotlin/kotlin-convention.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import org.radarbase.gradle.plugin.radarKotlin | ||
|
||
plugins { | ||
id("org.radarbase.radar-kotlin") | ||
} | ||
|
||
radarKotlin { | ||
// TODO remove after using new release of radar-kotlin plugin | ||
javaVersion.set(17) | ||
} |
18 changes: 18 additions & 0 deletions
18
java-sdk/buildSrc/src/main/kotlin/publishing-convention.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
id("kotlin-convention") | ||
id("org.radarbase.radar-publishing") | ||
} | ||
|
||
radarPublishing { | ||
val githubRepoName = "RADAR-base/RADAR-Schemas" | ||
githubUrl.set("https://github.com/$githubRepoName.git") | ||
|
||
developers { | ||
developer { | ||
id.set("pvannierop") | ||
name.set("Pim van Nierop") | ||
email.set("[email protected]") | ||
organization.set("The Hyve") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
projectVersion=0.8.11 | ||
|
||
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[versions] | ||
# Platform | ||
gradle = "8.9" | ||
kotlin = "1.9.23" | ||
|
||
argparse4j = "0.9.0" | ||
avro = "1.11.4" | ||
avroGenerator = "1.9.1" | ||
confluent = "7.6.0" # Keep in sync with 'kafka' version. | ||
jackson = "2.16.1" | ||
jakartaValidation = "3.0.2" | ||
junit = "5.9.3" | ||
kafka = "7.6.0-ce" # Keep in sync with 'confluent' version. | ||
ktor = "2.3.4" | ||
log4j2="2.20.0" | ||
okHttp = "4.12.0" | ||
radarCommons = "1.1.3" | ||
radarJersey = "0.11.1" | ||
|
||
[libraries] | ||
# For buildSrc project | ||
gradle-radar-kotlin = { group = "org.radarbase.radar-kotlin", name = "org.radarbase.radar-kotlin.gradle.plugin", version.ref = "radarCommons" } | ||
gradle-radar-publishing = { group = "org.radarbase.radar-publishing", name = "org.radarbase.radar-publishing.gradle.plugin", version.ref = "radarCommons" } | ||
|
||
argparse4j = { group = "net.sourceforge.argparse4j", name = "argparse4j", version.ref = "argparse4j" } | ||
avro = { group = "org.apache.avro", name = "avro", version.ref = "avro" } | ||
connect-json = { group = "org.apache.kafka", name = "connect-json", version.ref = "kafka" } | ||
jackson-bom = { group = "com.fasterxml.jackson", name = "jackson-bom", version.ref = "jackson" } | ||
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core", version.ref = "jackson" } | ||
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson" } | ||
jakarta-validation-api = { group = "jakarta.validation", name = "jakarta.validation-api", version.ref = "jakartaValidation" } | ||
kafka-connect-api = { group = "org.apache.kafka", name = "connect-api", version.ref = "kafka" } | ||
kafka-connect-avro-converter = { group = "io.confluent", name = "kafka-connect-avro-converter", version.ref = "confluent" } | ||
kafka-connect-avro-data = { group = "io.confluent", name = "kafka-connect-avro-data", version.ref = "confluent" } | ||
kafka-schema-registry-client = { group = "io.confluent", name = "kafka-schema-registry-client", version.ref = "confluent" } | ||
ktor-client-auth = { group = "io.ktor", name = "ktor-client-auth", version.ref = "ktor" } | ||
log4j2-core = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j2" } | ||
mockwebserver = { group = "com.squareup.okhttp3", name = "mockwebserver", version.ref = "okHttp" } | ||
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okHttp" } | ||
radar-commons = { group = "org.radarbase", name = "radar-commons", version.ref = "radarCommons" } | ||
radar-commons-kotlin = { group = "org.radarbase", name = "radar-commons-kotlin", version.ref = "radarCommons" } | ||
radar-commons-server = { group = "org.radarbase", name = "radar-commons-server", version.ref = "radarCommons" } | ||
radar-jersey = { group = "org.radarbase", name = "radar-jersey", version.ref = "radarJersey" } | ||
|
||
[plugins] | ||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } | ||
davidmc24-avro-base = { id = "com.github.davidmc24.gradle.plugin.avro-base", version.ref = "avroGenerator" } | ||
kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# RADAR Catalog Server | ||
|
||
## Sentry monitoring | ||
|
||
To enable Sentry monitoring: | ||
|
||
1. Set a `SENTRY_DSN` environment variable that points to the desired Sentry DSN. | ||
2. (Optional) Set the `SENTRY_LOG_LEVEL` environment variable to control the minimum log level of events sent to Sentry. | ||
The default log level for Sentry is `WARN`. Possible values are `TRACE`, `DEBUG`, `INFO`, `WARN`, and `ERROR`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
java-sdk/radar-catalog-server/src/main/resources/log4j2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
~ /* | ||
~ * Copyright 2024 The Hyve | ||
~ * | ||
~ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ * you may not use this file except in compliance with the License. | ||
~ * You may obtain a copy of the License at | ||
~ * | ||
~ * http://www.apache.org/licenses/LICENSE-2.0 | ||
~ * | ||
~ * Unless required by applicable law or agreed to in writing, software | ||
~ * distributed under the License is distributed on an "AS IS" BASIS, | ||
~ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ * See the License for the specific language governing permissions and | ||
~ * limitations under the License. | ||
~ */ | ||
--> | ||
|
||
<configuration status="INFO"> | ||
<appenders> | ||
<Console name="Console" target="SYSTEM_OUT"> | ||
<PatternLayout | ||
pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" | ||
/> | ||
</Console> | ||
<!-- For Sentry to work the DSN must be set via SENTRY_DSN environment variable | ||
When SENTRY_DSN is empty string, the Sentry SDK is disabled --> | ||
<Sentry name="Sentry" debug="false"/> | ||
</appenders> | ||
|
||
<loggers> | ||
<root level="INFO"> | ||
<appender-ref ref="Console" /> | ||
<!-- Note that the Sentry logging threshold is at WARN level by default --> | ||
<appender-ref ref="Sentry" level="${env:SENTRY_LOG_LEVEL:-WARN}" /> | ||
</root> | ||
</loggers> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ewelinagr No, defaults are defined in the radar-commons kotlin project gradle plugin. Better to use these defaults.