Skip to content

Commit

Permalink
[#9631] Fix query error when a specific agentId is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
intr3p1d committed Sep 9, 2024
1 parent 93670fa commit 15af83a
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@

applicationName,

LASTWITHTIME(agentId, "timestamp", 'STRING') as "agentId",
<if test="agentId == null">
LASTWITHTIME(agentId, "timestamp", 'STRING') as "agentId",
</if>
<if test="agentId != null">
agentId,
</if>
LASTWITHTIME(transactionId, "timestamp", 'STRING') as "transactionId",
LASTWITHTIME(spanId, "timestamp", 'LONG') as "spanId",
LASTWITHTIME(exceptionId, "timestamp", 'LONG') as "exceptionId"
Expand All @@ -45,6 +50,9 @@
AND agentId = #{agentId}
</if>
GROUP BY applicationName
<if test="agentId != null">
, agentId
</if>
<include refid="groupByAllAttributes"></include>
ORDER BY count(*) desc
LIMIT 10
Expand Down

0 comments on commit 15af83a

Please sign in to comment.