Exporting SQL statement metrics to Prometheus #1220
Replies: 4 comments
-
yes, by default there is no dedicated metric which represents the SQL statement duration based on executed SQL statement. However, the agent exports the following metrics If you need the execution times split by SQL statement, you have to create a custom rule and metric for collecting and exporting this data. |
Beta Was this translation helpful? Give feedback.
-
Hi mariusoe, Thanks for clarifying. Could you give me some examples of doing something like this with the exporter? Thanks |
Beta Was this translation helpful? Give feedback.
-
Could you please help me with any possible documentation on the Prometheus exporter to ad the SQL statements? I know that the agent is scraping the SQL statements because I can see them in Jaeger. So it's just a matter of adding it in the prometheus exporter code. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
yes, we'll put a new section into the documentation on how such a metric can be created. I think a detailed guide for this would help many users. |
Beta Was this translation helpful? Give feedback.
-
I am exporting the metrics from the agent to prometheus. I can't seem to export metrics on SQL statements. I can see the DB connections and the total time taken for all the connections, but don't see any SQL statements. With pooling of JDBC connections, that doesn't give me any metrics on SQL statement execution time.
I can see the SQL Statements when exported to Jaeger though. Is there any way to export it to Prometheus?
Beta Was this translation helpful? Give feedback.
All reactions