cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Monitoring SQLite in Dynatrace?

AntonioSousa
DynaMight Guru
DynaMight Guru

I have stumbled over a SQLite database inside a server application. OK, it doesn't seem good, but anyway, it was an interesting challenge to check out how we could monitor it in Dynatrace OOTB.

The first sign was a process with a lot of CPU usage. Dynatrace has identified SQLite as the "secondary technology" for the process. And when I say it's consuming a lot, it's like some 10 CPU cores...

In Dynatrace, I can see the process data, with the IO part being particularly interesting to check out what it is doing at disk level. But I have no application view, of course because it is statically linked inside the compiled executable (it's in Windows...).

Now, I'm looking for other ways to check this out. I have checked that the only OpenTelemetry implementation of SQLite is for the python implementation. Will probably come along in other flavors, but not soon... Also, not quite sure if there is some monitoring interface for SQLite, but for what I know, it would only be file monitoring, so Dynatrace extensions also seem difficult here.

So, in the meantime, are there other ideas from someone that might have stumbled over this, also?

Antonio Sousa
5 REPLIES 5

sonja
Dynatrace Champion
Dynatrace Champion

Hi Antonio,


I don't have a solution for your problem - but I don't think OpenTelemetry would have helped there either if you are not able to modify the code of the application.

But maybe I misunderstood - what kind of application is this? are you able to make changes to the code? which programming language is it using?

Sonja

Yes, the idea behind OpenTelemetry would be changing the code. At the moment, I know it is an executable, so there is no way obliviously that Dynatrace can instrument it to give us code visibility. We're trying to figure out more about it, so I'm being proactive here 😃 because the process is consuming those 10 cores, but we have no good idea why...

Antonio Sousa

Hi @AntonioSousa ,

funny I just have a (maybe) similar challenge. I'm investigating how I can get visibility into a Java bundled executable on windows as well.

Dynatrace detects that the process launches an JVM (with JDK version and all) and the secondary technology is also SQLite.

 

r_weber_0-1639409188405.png

 


However there is no information about the JVM (no details on memory, GC,...no instrumentation/no services). 

 

But, for some of these processes Dynatrace detects a opaque service for SQLite, when the service is called by another one:

 

r_weber_1-1639409252275.png

 

In my case the question would be how can I make sure that Dynatrace injects into the JVM that is bundled within the .exe launcher. I'd expect to see more information on SQLite also then...

 

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

@r_weber 

Very interesting! If you get around the Java issue, then it's a question of seeing if Dynatrace can identify the queries to SQLite. It seems to me it won't, but in any case you could then hook with a custom service those invocations, and eventually even get the SQL instruction in a request attribute. This latter part I will not be able to do, for sure.

Antonio Sousa

Hi @AntonioSousa ,

I managed to get around adding the agent to the bundled .exe. And Dynatrace is detecting services...but nothing with SQLite atm (maybe not yet used....don't know).

But the tricky thing is to get the agent into the bundled exe to actually hook into the VM. This seems to be not supported by Dynatrace (or it depends on the tool that created the .exe).

I had to fiddle with the 3rd party solution and how it actually launches the JVM. I had to manually add the "classic" -agentpath paramter to the JVM launch so that the agent gets loaded...not a very practical way... 😞

 

-agentpath:C:/PROGRA~1/DYNATR~1/oneagent/agent/lib64/oneagentloader.dll=isjdwppresent=true,loglevelcon=none

 

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

Featured Posts