inspectIT / inspectit-ocelot

inspectIT Ocelot - Java agent for collecting application performance, tracing and behavior data
http://www.inspectit.rocks/
Apache License 2.0
202 stars 69 forks source link

Add sqlcommenter lib to SQL-instrumentation #1148

Open mc-chaos opened 3 years ago

mc-chaos commented 3 years ago

Sqlcommenter is an open source library that enables ORMs to augment SQL statements before execution, with comments containing information about the code that caused its execution. This helps in easily correlating slow queries with source code and giving insights into backend database performance. In short, it provides observability into the state of client-side applications and their impact on database performance. Application developers need to do very little application code change to enable Sqlcommenter for their applications using ORMs. Observability information from Sqlcommenter can be used by application developers directly using slow query logs, or it can be integrated into other products or tools, such as Cloud SQL Insights, to provide application-centric monitoring.

See: https://cloud.google.com/blog/topics/developers-practitioners/introducing-sqlcommenter-open-source-orm-auto-instrumentation-library

and

https://github.com/google/sqlcommenter

mariusoe commented 3 years ago

Hi @mc-chaos

that framework looks quite interessting. Adding additional information to the SQL statements in order to identify the actual code which is responsible for it would be nice.

We'll check whether it is possible to intergrate this into the agent. Maybe this can be provided as an agent plugin..