10 Dec 2021 08:03 PM - edited 10 Dec 2021 08:04 PM
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?
13 Dec 2021 07:51 AM
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
13 Dec 2021 10:16 AM
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...
13 Dec 2021 03:28 PM
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.
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:
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...
13 Dec 2021 06:31 PM
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.
15 Dec 2021 04:05 PM
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