Skip to content

Commit

Permalink
support override java agent jar. (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTan95 authored Aug 3, 2022
1 parent d32130f commit 7ce42fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ significant modifications will be credited to OpenTelemetry Authors.
([#225](https://github.com/open-telemetry/opentelemetry-demo/pull/225))
* Add metrics endpoint in adservice to send metrics from java agent
([#237](https://github.com/open-telemetry/opentelemetry-demo/pull/237))
* Support override java agent jar
([#244](https://github.com/open-telemetry/opentelemetry-demo/pull/244))
1 change: 1 addition & 0 deletions src/adservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/ ./
COPY ./src/adservice/agent/opentelemetry-javaagent.jar /app/
ENV JAVA_TOOL_OPTIONS=-javaagent:/app/opentelemetry-javaagent.jar

EXPOSE ${AD_SERVICE_PORT}
ENTRYPOINT [ "./build/install/hipstershop/bin/AdService" ]
4 changes: 0 additions & 4 deletions src/adservice/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,13 @@ task adService(type: CreateStartScripts) {
applicationName = 'AdService'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
defaultJvmOpts =
["-javaagent:/app/opentelemetry-javaagent.jar"]
}

task adServiceClient(type: CreateStartScripts) {
mainClass.set('hipstershop.AdServiceClient')
applicationName = 'AdServiceClient'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
defaultJvmOpts =
["-javaagent:/app/opentelemetry-javaagent.jar"]
}

applicationDistribution.into('bin') {
Expand Down

0 comments on commit 7ce42fd

Please sign in to comment.