Jump to content
Excelsior Forums
RogerParkinson

Instrumentation

Recommended Posts

I got my Spring Boot application built and seems to run okay. Cool. It slimmed down about 100MB too. This is a microservice and we have lots of them so being able to fit more of them into an EC2 would be nice, the startup lag is not too important for us, mostly the size.

But one issue is that we rely on New Relic for instrumentation. I saw in the notes that -javaagent is ignored and anyway New Relic is designed to instrument bytecode not compiled code.

So what options are there for instrumentation? Anything?

Thanks

Share this post


Link to post
Share on other sites

Hello,

Yes, unfortunately AOT compilation makes it impossible to use any kind of dynamic bytecode instrumentation due to contradictory nature of these types of technology.
Instrumentation depends on the fact that JVM will load and execute (via interpreter or JIT) the instrumented bytecode at runtime.
However AOT means that the bytecode (neither original nor instrumented) won't be used at all because everything is already pre-compiled.

So the only way to enable instrumentation with Excelsior JET is not to pre-compile classes which are intended for instrumentation.
Such classes will be available for dynamic instrumentation and JIT-compiled at runtime.
However as JIT-compilation generates much less optimized code this approach might lead to performance and startup time degradation depending on the number of JIT-compiled classes.
And also the rest of the pre-compiled code might be less optimized.

Best Regards,
Ruslan Kim
Excelsior Support

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×