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-pg
branch - Run
yarn install
in the beeline-nodejs folder - Run
yarn link
within the beeline-nodejs folder
- Navigate to the
pg-trace-example
folder - Run
./bin/setup.sh
- Update the
HONEYCOMB_ENABLED
,HONEYCOMB_WRITE_KEY
andHONEYCOMB_DATASET
values in.env
to configure honeycomb - Update the
DB_*
values in.env
to match your local postgres server's config. - Run
yarn link beeline-nodejs
to link with local modified version of beeline-nodejs. - Run
DEBUG=honeycomb-beeline:* yarn start
to start service locally - Run
curl localhost:8080/example
in 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.