Show DB Query variables

Hi,

is it possible to get the used value of a DB-Query-Span?

I see this span in my transactions:

select REVISION_ID, JOURNAL_ID, PRODUCER_ID, REVISION_DATA from CL_J_JOURNAL where REVISION_ID > ? order by REVISION_ID

The "?" seems to be a placeholder but should be a number. In glowroot i can see the same query to be shown like this:

jdbc query: select REVISION_ID, JOURNAL_ID, PRODUCER_ID, REVISION_DATA from CL_J_JOURNAL where REVISION_ID > ? order by REVISION_ID [8977]

In glowroot i can see that the "?" in the query was "8977". Do i miss something, or is the Java Agent not capable of capturing such things?

APM Agent language and version:
Java 1.4.0

2 Likes

Hi and thanks for the question :slight_smile:
We are not capturing SQL statement parameters as of yet. As a matter of fact, we did not get a lot of requests for that so far, so it is not currently planned.
Based on your experience, did you find it valuable for identifying root cause of problems? Any other ways you found it very useful?
Thanks,
Eyal.

Hi,

i found it very usefull, bcs i wasnt able to track down the root cause of a problem with elastic APM.

Then with glowroot i saw that this statement was in a transaction which caused the exception. And the Problem was that the exception message was "null" (bad lib..). So with the complete Query-Statement i was able to reproduce the problem.

Bcs. the Exception was only triggered with one specific ID in one specific Usecase...

It would be awesome when this feature would find its way to the agent. I get it when this can cause performance impacts, but maybe it can be added as a optional feature which can be enabled when needed.

Thx for the response!

I see. Thanks for taking the time to explain! We will factor your useful feedback in when considering it.

3 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.