Stackdriver Trace plugin for TinyPg
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
...
}
})
This plugin monkey patches TinyPg
's sql
function.
row_count
- Number of rows returned from thesql
callsource
- tinypgerror
- Any errors thrown from thesql
call