Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

C SDK - Instrument a .so and a .so accessed via JNI?

rfb
c-sdk

#1

Hello

As part of a project to determine new relic viability for our needs:

  1. Is it possible for a .so ( that is guaranteed to only loaded by one process ) to be profiled by the
    SDK by linking your static lib?

  2. If 1) can be done, is it possible to profile a JVM app that loads the .so via JNI, at the same time?


#2

Thanks for your questions!

The C SDK doesn’t provide any built-in profiling capabilities. Instead, you monitor your application by creating transactions and segments using the C SDK API. This requires both that the C SDK be linked into your application (either via static or dynamic linking) and that you add the appropriate function calls as required.

We haven’t tested the JNI case specifically, but I can’t think of any particular reason it wouldn’t work. (Bonus: if you use the Java agent to monitor your JVM app, you could also use distributed tracing to link the transactions created by the Java agent and C SDK together, provided you can pass a payload string from the caller to the callee.)