Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 725 Bytes

README.md

File metadata and controls

22 lines (19 loc) · 725 Bytes

tinypg-trace-plugin

Stackdriver Trace plugin for TinyPg

Usage

Include tinypg-trace-plugin in the the plugins object that gets passed to the trace agent on start

require('@google-cloud/trace-agent').start({
   plugins: {
      'tinypg': 'tinypg-trace-plugin',
      'pg': false, // pg spans are uncorrelated to tinypg spans so it works best when the pg plugin is disabled
      ...
   }
})

What gets traced?

This plugin monkey patches TinyPg's sql function.

Labels

  • row_count - Number of rows returned from the sql call
  • source - tinypg
  • error - Any errors thrown from the sql call