Instrumenting the Database client with Elastic APM

After we set up Elastic APM to log our request transaction, the following thing we wish to instrument are the SQL queries going to our database endpoint. Elastic APM provides instrumentation that wraps the database/sql driver, which produces an *sql.DB.

Extending DB connection

We already planned to produce a *sqlx.DB for this eventuality with the Connector field function in db.ConnectionOptions:

// Connector is an optional parameter to produce our // own *sql.DB, which is then wrapped in...
 •  0 comments  •  flag
Share on Twitter
Published on December 17, 2019 13:10
No comments have been added yet.