Instrumenting database calls
Databases are used in almost every distributed application. Many databases provide advanced monitoring capabilities on the server side, which include database-specific metrics, logs, or expensive query detection and analysis tools. Client instrumentation complements it by providing observability on the client side of this communication, correlating database operations, and adding application-specific context.
Client instrumentation describes an application’s communication with a database ORM system, driver, or client library, which can be quite complicated performing load balancing or batching operations in the background.
In some cases, it could be possible to trace network-level communication between the client library and the database cluster. For example, if a database uses gRPC or HTTP protocols, the corresponding auto-instrumentation would capture transport-level spans. In this case, we would see transport-level spans as children of a...