Agent inclusion in docker via Gradle/Jib... idea for doc #2039
Unanswered
alexvanboxel
asked this question in
Q&A
Replies: 1 comment
-
hi @alexvanboxel! I think this would make a great example under https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/master/examples |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are including the java agent now in our docker containers, it was a challenge wiring this in our Gradle builds. I'll include the useful snippets here, but this could be useful to include these snippets somewhere in some documentation. If someone tells me where it could live, I'll make a PR. Here are the snippets:
Add a dependency configuration in gradle:
Add the dependency to the agent
Jib automatically includes everything in
src\main\jib
. The container has the env variableOTEL_JAVAAGENT_ENABLED
set to false by default.Some tasks need to be included to hook into the lifecycle. We also reference that agent artifact in a run configuration (IntelliJ)
Beta Was this translation helpful? Give feedback.
All reactions