Skip to content
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

[Feat/#180-new-relic] new relic 설정 #181

Merged
merged 1 commit into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ARG JASYPT_KEY
ENV SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:-DEV}
ENV JASYPT_KEY=${JASYPT_KEY:-pw}

CMD java -jar -Duser.timezone=Asia/Seoul app.jar
CMD java -javaagent:/newrelic/newrelic.jar -Duser.timezone=Asia/Seoul -jar app.jar
19 changes: 18 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'jacoco'
id "org.sonarqube" version "4.4.1.3373"
id "de.undercouch.download" version "5.3.0"
}

group = 'com.apps'
Expand All @@ -25,6 +26,22 @@ repositories {
mavenCentral()
}

task downloadNewrelic(type: Download) {
mkdir 'newrelic'
src 'https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip'
dest file('newrelic/newrelic-java.zip')

onlyIf { !file('newrelic/newrelic-java.zip').exists() }
}

task unzipNewrelic(type: Copy) {
dependsOn downloadNewrelic
from zipTree(file('newrelic/newrelic-java.zip'))
into rootDir
}

build.dependsOn unzipNewrelic

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
Expand Down Expand Up @@ -189,4 +206,4 @@ sonarqube {
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.login", "${System.getenv('SONAR_TOKEN')}"
}
}
}
Loading
Loading