For high node count installations, it’s quite costly to go through the existing commercial systems, as such, i took the same idea as lucee did a few years ago, and contributed a plugin to elastic’s apm agent. this allows to use an existing elastic cluster to gain app insights.
Out of necessity, i’ve battled with elastic-java-apm-agent to instrument the lucee server, the great news is that the latest version of the agent, can theoretically work on a “vanilla” version of lucee server (we’re currently running custom builds for other optimisation reasons). I can therefore link to the github.
This Implementation do instrument quite a lot, still a work in progress, but more test, more use always helps. Obviously, it requires to build the existing code, this is not that complex, and to simply start the server with the agent as java-agent.
Here is the link if anyone feels adventurous :
the branch you want is : feature/lucee-server-http-instrumentation
Currently implemented features:
outpgoing http with trace transmission,
Database and redis (via the existing plugins)
all the application.cfc hooks
DbManager (connection retrieval and transactions operations)
Java “CreateObject” layer
_InternalRequest instrumentation as a sub transaction (i’m still struggling to separate the spancount limit).
I’m not certain a lot other operations are problematic, but, use case can help pinpoint to new propositions. Been running in production with a quite high traffic (largely over 1K transaction per minute) for ~1 year
First of all let me thank you for this very cool work.
I also did some playing around with Elastic-APM a while ago for the same reason as yours (shit expensive existing APM solutions), and I really felt the need to have a custom plugin for Lucee.
Now I’m not as familiar with Lucee codebase to roll my own custom APM plugin from scratch, but your work definitely gives me the necessary platform + courage to do some more experiments and hopefully do some contributions in the plugin.
It would be really nice if you can help me(us, I’m sure other folks will also be interested in this) with the necessary setup, for development and testing.
For the linking it with lucee, I’ll first recommend you read the code to make sure i haven’t done anything nasty (i’ll repeat it if you want to run it in production), this is able to capture and will alter your http calls, so, gives basically the keys to your system.
To build the agent, well, basically, it’s something like :
clone the repository, checkout the branch: feature/lucee-server-http-instrumentation which is a misnomer, because it went further.
./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true # build only jar
You’ll find the .jar inside the build directory.
The last step would be to link those to your lucee,