-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from musabbozkurt/add-new-relic-java-agent
Add New Relic Java agent
- Loading branch information
Showing
8 changed files
with
586 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
NEW_RELIC_LICENSE_KEY=eu01xxhu5ic8N0TmUkXQLgb0VWufpuyvapd0Qz63 | ||
NEW_RELIC_APP_NAME=inventory-management-service | ||
NEW_RELIC_ENDPOINT=https://otlp.eu01.nr-data.net | ||
NEW_RELIC_ENABLED=false | ||
NEW_RELIC_INFRA_AGENT_REPLICAS=0 |
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,4 +1,20 @@ | ||
FROM openjdk:21-jdk-slim | ||
|
||
# Uncomment the following command to define the location of the New Relic agent JAR | ||
# ARG NEW_RELIC_AGENT_JAR=opt/newrelic/newrelic.jar | ||
|
||
# Define the location of the application JAR | ||
ARG JAR_FILE=target/*.jar | ||
|
||
# Uncomment the following command to copy the New Relic agent JAR into the Docker image | ||
# COPY ${NEW_RELIC_AGENT_JAR} /opt/newrelic/newrelic.jar | ||
|
||
# Copy the application JAR into the Docker image | ||
COPY ${JAR_FILE} inventory-management-service.jar | ||
|
||
# Set the entrypoint to run the application | ||
ENTRYPOINT ["java","-jar","/inventory-management-service.jar"] | ||
|
||
# Use the following ENTRYPOINT command instead of the above ENTRYPOINT command | ||
# to set the entrypoint to run the application with the New Relic Java agent | ||
# ENTRYPOINT ["java", "-javaagent:/opt/newrelic/newrelic.jar", "-jar", "/inventory-management-service.jar"] |
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.