Closed blagerweij closed 2 years ago
👍 That makes sense! I agree that the agent layer won't change as much as the application layer, I'll see what I can do to make it create more optimized images. Looking at the jib build plan API I'm thinking we could
ContainerBuildPlan.getLayers()
using this APIContainerBuildPlan.setLayers(List)
using this APIYour deployment model makes me think you might find some of the other things I'm working on useful. Definitely look into traceable.ai if you're looking past APM and into API security for your backend services. We have a free play 😄
I took the liberty of preparing a PR with the above feature. Please check carefully, since I'm no expert in Kotlin. https://github.com/ryandens/javaagent-gradle-plugin/pull/14
Thanks for the link to traceable.ai, will check it out. We're currently using a combination of DataDog and SnowFlake/SnowPlow to achieve pretty much the same, but that looks interesting. Also, we're currently using Open Policy Agent to not only monitor API usage, but also enforce some rulesets.
@ryandens any progress on reviewing the PR?
Hey there,
Thanks for making this really useful plugin available, until now we have been using a combination of Helm and initContainers to enable APM for our apps. I did notice one thing that is annoying:
When the plugin is used, the agent-jar is appended as the last layer (using the Jib extension). However, since the agent-jar does not change very often, it would be better if the agent-jar could be positioned right after the base image, before any dependencies, resources and classes. I checked the Jib extensions interface for build plans, and I could only find 'addLayer' (which appends to the last layer). However I'm hoping there is a way to inject the JAR not at the end....