项目作者: alexmunda

项目描述 :
Stackdriver Trace plugin for TinyPg
高级语言: TypeScript
项目地址: git://github.com/alexmunda/tinypg-trace-plugin.git
创建时间: 2018-11-26T21:39:01Z
项目社区:https://github.com/alexmunda/tinypg-trace-plugin

开源协议:

下载


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

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

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