[Feature] How to aggregate sql statement using query to ES? #13688
-
Search before asking
DescriptionHello, Best Regards, Use caseNo response Related issuesNo response Are you willing to submit a pull request to implement this on your own?
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
|
We don't support this kind of aggregation. Can't see the point of statistics of these. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, thank you to reply me. I used elacsticsearch as backend store. If I need to aggregate by sql statement, calculate average latency, I should base64decode every trace in sw_segment-* index to parse each span's tag which saved sql statement in data_binary field. It costs high system load. I want to let my agent mysql plugin to get sql in sw_log-* index. It is easy to aggregate directly. But only the java main application's log can be report to sw_log-* index. Please suggest me how to aggregate sql efficiently. |
Beta Was this translation helpful? Give feedback.
-
|
I can aggregate sql statement using sw_records-all index and set access db threshold(slow sql minimum latency) to 0 in application.yml. Now I want to aggregate sql exception like SQLSYNTAXERROR exception to get the total number the exception occurs. I try to use tags field in sw_segment index. But my skywalking 10.2.0 shows the index template has excluded tags and tags type is keyword. But AI said its type is object and exclude nothing. So which index template is correct? And can I aggregate the tags' key in sw_segment index? |
Beta Was this translation helpful? Give feedback.
We don't support this kind of aggregation. Can't see the point of statistics of these.
If you want to, aggregation supported in elastic(not in BanyanDB), you could run query on your own. BASE64 is just an encoder, you have public way to decode after query.