Example application to test prospective pg instrumentation for beeline-nodejs
Minimum example to accompany beeline-nodejs PR#155.
Note, requires nvm, yarn/npm and postgres running locally
Should be able to switch out any call to yarn with npm if required.
- Clone beeline-nodejs and checkout
instrument-pgbranch - Run
yarn installin the beeline-nodejs folder - Run
yarn linkwithin the beeline-nodejs folder
- Navigate to the
pg-trace-examplefolder - Run
./bin/setup.sh - Update the
HONEYCOMB_ENABLED,HONEYCOMB_WRITE_KEYandHONEYCOMB_DATASETvalues in.envto configure honeycomb - Update the
DB_*values in.envto match your local postgres server's config. - Run
yarn link beeline-nodejsto link with local modified version of beeline-nodejs. - Run
DEBUG=honeycomb-beeline:* yarn startto start service locally - Run
curl localhost:8080/examplein a new terminal to trigger the test
The postgres query is being made from src/exampleRouter.ts. You should be able to tweak the query to see failure states and what gets sent with them, as opposed to when you have a successful query.