{"_id":"@christiangalsterer/pg-promise-prometheus-exporter","_rev":"5-f6a024a5bb0f085b65f7a7fb07d5d324","name":"@christiangalsterer/pg-promise-prometheus-exporter","dist-tags":{"latest":"2.2.0"},"versions":{"1.0.0":{"name":"@christiangalsterer/pg-promise-prometheus-exporter","version":"1.0.0","keywords":["pg-promise","node-postgres","postgres","prometheus","monitoring","metrics","opentelemetry","pg-promise prometheus","pg-promise monitoring","pg-promise metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/pg-promise-prometheus-exporter@1.0.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter/issues"},"dist":{"shasum":"8a585f903a535ecc1576eb66c2f601f1a4703301","tarball":"https://registry.npmjs.org/@christiangalsterer/pg-promise-prometheus-exporter/-/pg-promise-prometheus-exporter-1.0.0.tgz","fileCount":18,"integrity":"sha512-37b9gvI9x6aeDIAz/Pj/1DmggPJ1/ZeaJA8Mjv5rvvjUHoGK6ZpcgcbIwSgRi3pXCl/zYa8OR3hptbDBZyY3SQ==","signatures":[{"sig":"MEMCIE7NzMymfGUad0SEOLfNXY7vArmWjduNZ4qsYY86/T8tAh9I3N4jx3VvfyTli8Uhif++GzIkrCpXePHVr4fc9Hr+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41698},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=10"},"gitHead":"2d0122928aeb3af57d092b57d0e00b5fe760fe44","scripts":{"ci":"npm ci --include=prod --include=dev && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","publish":"npm publish --access=public","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","release:major":"npm run release:prepare && npm version major -m 'build:release %s'","release:minor":"npm run release:prepare && npm version minor -m 'build:release %s'","release:patch":"npm run release:prepare && npm version patch -m 'build:release %s'","test:coverage":"jest --forceExit --coverage --verbose","publish:dry-run":"npm publish --access=public --dry-run","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run lint:fix && npm run build && npm run test","renovate:config":"npx renovate-config-validator"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/pg-promise-prometheus-exporter.git","type":"git"},"_npmVersion":"9.7.2","description":"A prometheus exporter for pg-promise","directories":{"test":"test"},"_nodeVersion":"20.4.0","dependencies":{"pg-promise":"^11.5.4","prom-client":"^15.0.0","@christiangalsterer/node-postgres-prometheus-exporter":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.2.5","renovate":"37.175.0","typescript":"5.3.3","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-plugin-jest":"27.6.3","eslint-config-standard-with-typescript":"43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pg-promise-prometheus-exporter_1.0.0_1707384607440_0.7910455717783009","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@christiangalsterer/pg-promise-prometheus-exporter","version":"1.1.0","keywords":["pg-promise","node-postgres","postgres","prometheus","monitoring","metrics","opentelemetry","pg-promise prometheus","pg-promise monitoring","pg-promise metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/pg-promise-prometheus-exporter@1.1.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter/issues"},"dist":{"shasum":"48880545ac02c47930ca5609ecb633ae0f73da75","tarball":"https://registry.npmjs.org/@christiangalsterer/pg-promise-prometheus-exporter/-/pg-promise-prometheus-exporter-1.1.0.tgz","fileCount":18,"integrity":"sha512-HX7deqQC5E/O69zKBZkaZ7mf67MrmE0GR5HV5HpJ1ZzUXYLpsBFPVIHDdcm5TskNGnqXnk7XgSKJAetc/PMLKA==","signatures":[{"sig":"MEYCIQDxYEm7Tz6FX56SNkHsQ2ImSnfbk3qP0IqKgDtjkLNXxwIhAPeEo3iVZ9PZPnZ5dlruwNa/L1yaoP10L6CzUCBkbJSr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44256},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=10"},"gitHead":"c1f474761b519e3ea3f2143980f63266d8ee3fbc","scripts":{"ci":"npm ci --include=prod --include=dev && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","publish":"npm publish --access public","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","release:major":"npm run release:prepare && npm version major -m 'build:release %s'","release:minor":"npm run release:prepare && npm version minor -m 'build:release %s'","release:patch":"npm run release:prepare && npm version patch -m 'build:release %s'","test:coverage":"jest --forceExit --coverage --verbose","publish:dry-run":"npm publish --dry-run --access public","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run lint:fix && npm run build && npm run test","renovate:config":"npx renovate-config-validator"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/pg-promise-prometheus-exporter.git","type":"git"},"_npmVersion":"9.7.2","description":"A prometheus exporter for pg-promise","directories":{"test":"test"},"_nodeVersion":"20.4.0","dependencies":{"pg-promise":"^11.5.4","prom-client":"^15.0.0","@christiangalsterer/node-postgres-prometheus-exporter":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.2.5","renovate":"37.181.11","typescript":"5.3.3","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-plugin-jest":"27.6.3","eslint-config-standard-with-typescript":"43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pg-promise-prometheus-exporter_1.1.0_1707894944867_0.2361489132798471","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@christiangalsterer/pg-promise-prometheus-exporter","version":"2.0.0","keywords":["pg-promise","node-postgres","postgres","prometheus","monitoring","metrics","opentelemetry","pg-promise prometheus","pg-promise monitoring","pg-promise metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/pg-promise-prometheus-exporter@2.0.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter/issues"},"dist":{"shasum":"b69ff14dead2f4278bde1f433f2848054db15143","tarball":"https://registry.npmjs.org/@christiangalsterer/pg-promise-prometheus-exporter/-/pg-promise-prometheus-exporter-2.0.0.tgz","fileCount":18,"integrity":"sha512-+1mk7I0uPbw/fmAmjpMW9K4XZnekBmo8hPTdc2EDnbZMjQ31mj0NYEob554L9nmj1UK+hLaw1oerUcfMeCpdWw==","signatures":[{"sig":"MEQCID/oeVRmlu8nIoSo0k9t5IsuLaHTssyzwPtx/8wqB/HgAiAQ/Nn9EJufSOpLpyMIMI7PfaUbuqglpspN3khtunDzVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46109},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=10"},"gitHead":"e657692281e912d62f8f1a6f47ba4b134f4966b3","scripts":{"ci":"npm ci --include=prod --include=dev && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","publish":"npm publish --access public","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","test:coverage":"jest --forceExit --coverage --verbose","publish:dry-run":"npm publish --dry-run --access public","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run lint:fix && npm run build && npm run test","renovate:config":"npx renovate-config-validator"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/pg-promise-prometheus-exporter.git","type":"git"},"_npmVersion":"9.7.2","description":"A prometheus exporter for pg-promise","directories":{"test":"test"},"_nodeVersion":"20.4.0","dependencies":{"pg-promise":"^11.5.4","prom-client":"^15.0.0","@christiangalsterer/node-postgres-prometheus-exporter":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.2.5","renovate":"37.181.11","typescript":"5.3.3","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-plugin-jest":"27.6.3","eslint-config-standard-with-typescript":"43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pg-promise-prometheus-exporter_2.0.0_1709277654408_0.739260912757286","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@christiangalsterer/pg-promise-prometheus-exporter","version":"2.1.0","keywords":["pg-promise","node-postgres","postgres","prometheus","monitoring","metrics","pg-promise prometheus","pg-promise monitoring","pg-promise metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/pg-promise-prometheus-exporter@2.1.0","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter/issues"},"dist":{"shasum":"240a8a23a8afde3402ab7bbcd70b03d26dc4dfbd","tarball":"https://registry.npmjs.org/@christiangalsterer/pg-promise-prometheus-exporter/-/pg-promise-prometheus-exporter-2.1.0.tgz","fileCount":18,"integrity":"sha512-uWRmYII8pfC5JJrszcuoT/S2gwl2xyZu83jcAaEUo7sESUvai1rXbKCIimUaAYfEH7kgbeLzYgW3WmFsUGWWrQ==","signatures":[{"sig":"MEUCIC/yxZNQdQWQOJM5inDZSqgTktxIohcBVa4BHCvlxygEAiEAk/ekQ+CmWd1vxUgIUJsPOJ7mrB7QUvWQKGYolpS8Z2g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46765},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=10"},"gitHead":"352331db6f652b8636c4cf81bd7ea1298f2d52ee","scripts":{"ci":"npm ci --include=prod --include=dev && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","publish":"npm publish --access public","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules","clean:dist":"rm -rf ./dist","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","test:coverage":"jest --forceExit --coverage --verbose","publish:dry-run":"npm publish --dry-run --access public","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run lint:fix && npm run build && npm run test","renovate:config":"npx renovate-config-validator"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/pg-promise-prometheus-exporter.git","type":"git"},"_npmVersion":"9.7.2","description":"A prometheus exporter for pg-promise","directories":{"test":"test"},"_nodeVersion":"20.4.0","dependencies":{"pg-promise":"^11.5.5","prom-client":"^15.0.0","@christiangalsterer/node-postgres-prometheus-exporter":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.2.5","renovate":"37.300.0","typescript":"5.4.5","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-plugin-jest":"28.2.0","eslint-plugin-simple-import-sort":"12.1.0","eslint-config-standard-with-typescript":"43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pg-promise-prometheus-exporter_2.1.0_1713341039507_0.8092791635429135","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@christiangalsterer/pg-promise-prometheus-exporter","version":"2.1.1","keywords":["pg-promise","node-postgres","postgres","prometheus","monitoring","metrics","pg-promise prometheus","pg-promise monitoring","pg-promise metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","_id":"@christiangalsterer/pg-promise-prometheus-exporter@2.1.1","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"homepage":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter#readme","bugs":{"url":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter/issues"},"dist":{"shasum":"f3f462c3b1a4594cc8395bbca789cac40ac6df57","tarball":"https://registry.npmjs.org/@christiangalsterer/pg-promise-prometheus-exporter/-/pg-promise-prometheus-exporter-2.1.1.tgz","fileCount":18,"integrity":"sha512-9PI5Rje/hgJa00fliEvo4nvjqiPc69ecOd045xQor43FFlJTwY4i02NeAxpv+IyPpzsuYY0mk/z3hBCclr4oMg==","signatures":[{"sig":"MEQCICzgUnhyeEQNMyr91e+R9JaUrsr746DbgQxhQonHCQzaAiB73wXjTs/64R8fJLhyZIAYMIouZ628J5dHlcTpYBsatg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47484},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"39313d340de103b13ea579de94b1f66b2fe44fe3","scripts":{"ci":"npm i --save-dev && npm run format && npm run lint && npm run build && npm run test && npm run renovate:config","deps":"npm i --save-dev","lint":"eslint .","test":"jest --forceExit --verbose","build":"tsc","clean":"npm run clean:dist && npm run clean:deps","format":"prettier --check .","lint:fix":"eslint . --fix","clean:deps":"rm -rf ./node_modules && rm -rf package-lock.json && npm run deps","clean:dist":"rm -rf ./dist","format:fix":"prettier --write .","publish-npm":"npm run ci && npm publish --access public","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","test:coverage":"jest --forceExit --coverage --verbose","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run format && npm run lint && npm run build && npm run test","renovate:config":"npx renovate-config-validator","publish-npm:dry-run":"npm run ci && npm publish --dry-run --access public"},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"repository":{"url":"git+https://github.com/christiangalsterer/pg-promise-prometheus-exporter.git","type":"git"},"_npmVersion":"10.5.0","description":"A prometheus exporter for pg-promise","directories":{"test":"test"},"_nodeVersion":"21.7.3","dependencies":{"pg-promise":"^11.5.5","prom-client":"^15.0.0","@christiangalsterer/node-postgres-prometheus-exporter":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.2.2","prettier":"3.3.3","renovate":"37.432.0","typescript":"5.5.3","@types/jest":"29.5.12","@jest/globals":"29.7.0","eslint-config-love":"56.0.0","eslint-plugin-jest":"28.6.0","eslint-plugin-simple-import-sort":"12.1.1"},"_npmOperationalInternal":{"tmp":"tmp/pg-promise-prometheus-exporter_2.1.1_1721233938811_0.6650787780820022","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@christiangalsterer/pg-promise-prometheus-exporter","version":"2.2.0","description":"A prometheus exporter for pg-promise","repository":{"type":"git","url":"git+https://github.com/christiangalsterer/pg-promise-prometheus-exporter.git"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","ci":"npm i --save-dev && npm run format && npm run lint && npm run build && npm run test && npm run renovate:config","clean":"npm run clean:dist && npm run clean:deps","clean:dist":"rm -rf ./dist","clean:deps":"rm -rf ./node_modules && rm -rf package-lock.json && npm run deps","deps":"npm i --save-dev","format":"prettier --check .","format:fix":"prettier --write .","lint":"eslint .","lint:fix":"eslint . --fix","test":"jest --forceExit --verbose","test:coverage":"jest --forceExit --coverage --verbose","release:prepare":"npm run clean && npm i && npm i --save-dev && npm run format && npm run lint && npm run build && npm run test","release:major":"npm run release:prepare && npm version major -m 'build(release): release %s' && git push && git push --tags","release:minor":"npm run release:prepare && npm version minor -m 'build(release): release %s' && git push && git push --tags","release:patch":"npm run release:prepare && npm version patch -m 'build(release): release %s' && git push && git push --tags","publish-npm":"npm run ci && npm publish --access public","publish-npm:dry-run":"npm run ci && npm publish --dry-run --access public","renovate:config":"npx renovate-config-validator"},"keywords":["pg-promise","node-postgres","postgres","prometheus","monitoring","metrics","pg-promise prometheus","pg-promise monitoring","pg-promise metrics","postgres prometheus","postgres monitoring","postgres metrics"],"author":{"name":"Christian Galsterer"},"license":"MIT","dependencies":{"@christiangalsterer/node-postgres-prometheus-exporter":"^1.3.0","pg-promise":"^11.5.5","prom-client":"^15.0.0"},"devDependencies":{"@jest/globals":"29.7.0","@types/jest":"29.5.12","eslint-config-love":"56.0.0","eslint-plugin-jest":"28.6.0","eslint-plugin-simple-import-sort":"12.1.1","jest":"29.7.0","prettier":"3.3.3","renovate":"37.437.3","ts-jest":"29.2.3","typescript":"5.5.3"},"engines":{"node":">=18"},"bugs":{"url":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter/issues"},"homepage":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter#readme","directories":{"test":"test"},"_id":"@christiangalsterer/pg-promise-prometheus-exporter@2.2.0","gitHead":"d0f4654977613b3e8ab5e4dcb2499f63ac920dd7","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-y8V0lJJGzSrEogi8YJQ6QYrkdr7QU+meznlNizcY08f+sc0myo+5T1XEkNvErzSXOP7CMXFQE4tVF7RgorQtLw==","shasum":"22d78250b90ec935fe565e268dcc11ba70c5ce96","tarball":"https://registry.npmjs.org/@christiangalsterer/pg-promise-prometheus-exporter/-/pg-promise-prometheus-exporter-2.2.0.tgz","fileCount":18,"unpackedSize":48702,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC21nE0/XpHNRjIrmUqCNTfLIe3VvynPom8Y1Qz0/MkMQIhANGBl4EJSUSnUL5o3H0WoKgeSXCYhY3W6Dd6I3d9Mu4F"}]},"_npmUser":{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"},"maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-promise-prometheus-exporter_2.2.0_1721548799691_0.2636783391482065"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-08T09:30:07.328Z","modified":"2024-07-21T08:00:00.164Z","1.0.0":"2024-02-08T09:30:07.648Z","1.1.0":"2024-02-14T07:15:45.034Z","2.0.0":"2024-03-01T07:20:54.643Z","2.1.0":"2024-04-17T08:03:59.690Z","2.1.1":"2024-07-17T16:32:19.017Z","2.2.0":"2024-07-21T07:59:59.897Z"},"bugs":{"url":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter/issues"},"author":{"name":"Christian Galsterer"},"license":"MIT","homepage":"https://github.com/christiangalsterer/pg-promise-prometheus-exporter#readme","keywords":["pg-promise","node-postgres","postgres","prometheus","monitoring","metrics","pg-promise prometheus","pg-promise monitoring","pg-promise metrics","postgres prometheus","postgres monitoring","postgres metrics"],"repository":{"type":"git","url":"git+https://github.com/christiangalsterer/pg-promise-prometheus-exporter.git"},"description":"A prometheus exporter for pg-promise","maintainers":[{"name":"christian_galsterer","email":"christian.galsterer@gmx.de"}],"readme":"[![GitHub Actions CI Status](https://github.com/christiangalsterer/pg-promise-prometheus-exporter/actions/workflows/build.yaml/badge.svg)](https://github.com/christiangalsterer/pg-promise-prometheus-exporter/actions/workflows/build.yaml)\n[![codecov](https://codecov.io/gh/christiangalsterer/pg-promise-prometheus-exporter/graph/badge.svg?token=HD9IKRQN04)](https://codecov.io/gh/christiangalsterer/pg-promise-prometheus-exporter)\n[![Coverage Status](https://coveralls.io/repos/github/christiangalsterer/pg-promise-prometheus-exporter/badge.svg?branch=main)](https://coveralls.io/github/christiangalsterer/pg-promise-prometheus-exporter?branch=main)\n[![Known Vulnerabilities](https://snyk.io/test/github/christiangalsterer/pg-promise-prometheus-exporter/badge.svg)](https://github.com/christiangalsterer/pg-promise-prometheus-exporter/security/advisories)\n[![npm downloads](https://img.shields.io/npm/dt/@christiangalsterer/pg-promise-prometheus-exporter.svg)](https://www.npmjs.com/package/@christiangalsterer/pg-promise-prometheus-exporter)\n[![npm version](https://img.shields.io/npm/v/@christiangalsterer/pg-promise-prometheus-exporter.svg)](https://www.npmjs.com/package/@christiangalsterer/pg-promise-prometheus-exporter?activeTab=versions)\n[![npm license](https://img.shields.io/npm/l/@christiangalsterer/pg-promise-prometheus-exporter.svg)](https://www.npmjs.com/package/@christiangalsterer/pg-promise-prometheus-exporter)\n[![semver](https://img.shields.io/badge/semver-2.0.0-green)](https://semver.org)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://developer.mend.io/github/christiangalsterer/pg-promise-prometheus-exporter)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n![github stars](https://img.shields.io/github/stars/christiangalsterer/pg-promise-prometheus-exporter.svg)\n\n# Prometheus Exporter for pg-promise\n\nA prometheus exporter exposing metrics for [pg-promise](https://www.npmjs.com/package/pg-promise).\n\n## Available Metrics\n\nAs the exporter is utilizing the [node-postgres-prometheus-exporter](https://github.com/christiangalsterer/node-postgres-prometheus-exporter) for the majority of the connection and pool usage metrics, please check the [documentation](https://github.com/christiangalsterer/node-postgres-prometheus-exporter?tab=readme-ov-file#available-metrics) for the list of metrics.\n\nIn **addition** the exporter provides the following metrics.\n\n|Metric Name|Description|Labels|Since|\n|---|---|---|---|\n|pg_command_duration_seconds_bucket|Duration of the executed command in seconds|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_command_: Name of the command</li><li>_status_: SUCCESS or ERROR</li><ul>|2.0.0|\n|pg_command_duration_seconds_sum|The cumulated duration of the executed command in seconds|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_command_: Name of the command</li><li>_status_: SUCCESS or ERROR</li><ul>|2.0.0|\n|pg_command_duration_seconds_count|Number of executed commands|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_command_: Name of the command</li><li>_status_: SUCCESS or ERROR</li><ul>|2.0.0|\n|pg_task_duration_seconds_bucket|Duration of the executed task in seconds|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_task_: The tag as provided when executing the task. **Note:** The tag will be only added if it is a valid label value.</li><ul>|2.0.0|\n|pg_task_duration_seconds_sum|Cumulated duration of the executed task in seconds|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_task_: The tag as provided when executing the task. **Note:** The tag will be only added if it is a valid label value.</li><ul>|2.0.0|\n|pg_task_duration_seconds_count|Number of executed tasks|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_task_: The tag as provided when executing the task. **Note:** The tag will be only added if it is a valid label value.</li><ul>|2.0.0|\n|pg_transaction_duration_seconds_bucket|Duration of the executed transactions in seconds|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_transaction_: The tag as provided when executing the transaction. **Note:** The tag will be only added if it is a valid label value.</li><ul>|2.0.0|\n|pg_transaction_duration_seconds_sum|Cumulated duration of the executed transactions in seconds|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_transaction_: The tag as provided when executing the transaction. **Note:** The tag will be only added if it is a valid label value.</li><ul>|2.0.0|\n|pg_transaction_duration_seconds_count|Number of executed transactions|<ul><li>_host_: The host of the database</li><li>_database_: The database name</li><li>_transaction_: The tag as provided when executing the transaction. **Note:** The tag will be only added if it is a valid label value.</li><ul>|2.0.0|\n\n## Example Output\n\nHere an example output in the prometheus format of the provided metrics.\n\n```sh\n# HELP pg_client_errors_total The total number of connection errors with a database.\n# TYPE pg_client_errors_total counter\npg_client_errors_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_client_disconnects_total The total number of disconnected connections.\n# TYPE pg_client_disconnects_total counter\npg_client_disconnects_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_pool_connections_created_total The total number of created connections.\n# TYPE pg_pool_connections_created_total counter\npg_pool_connections_created_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 19\n\n# HELP pg_pool_size The current size of the connection pool, including active and idle members.\n# TYPE pg_pool_size gauge\npg_pool_size{host=\"localhost:5432\",database=\"node_postgres_test1\"} 10\n\n# HELP pg_pool_max The maximum size of the connection pool.\n# TYPE pg_pool_max gauge\npg_pool_max{host=\"localhost:5432\",database=\"node_postgres_test1\"} 10\n\n# HELP pg_pool_active_connections The total number of active connections.\n# TYPE pg_pool_active_connections gauge\npg_pool_active_connections{host=\"localhost:5432\",database=\"node_postgres_test1\"} 10\n\n# HELP pg_pool_waiting_connections The total number of waiting connections.\n# TYPE pg_pool_waiting_connections gauge\npg_pool_waiting_connections{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_pool_idle_connections The total number of idle connections.\n# TYPE pg_pool_idle_connections gauge\npg_pool_idle_connections{host=\"localhost:5432\",database=\"node_postgres_test1\"} 0\n\n# HELP pg_pool_errors_total The total number of connection errors with a database.\n# TYPE pg_pool_errors_total counter\npg_pool_errors_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 1\n\n# HELP pg_pool_connections_removed_total The total number of removed connections.\n# TYPE pg_pool_connections_removed_total counter\npg_pool_connections_removed_total{host=\"localhost:5432\",database=\"node_postgres_test1\"} 9\n\n# HELP pg_command_duration_seconds Timer of pg commands\n# TYPE pg_command_duration_seconds histogram\npg_command_duration_seconds_bucket{le=\"0.001\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.005\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.01\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.02\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.03\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.04\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.05\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 21\npg_command_duration_seconds_bucket{le=\"0.1\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 31\npg_command_duration_seconds_bucket{le=\"0.2\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 38\npg_command_duration_seconds_bucket{le=\"0.5\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 40\npg_command_duration_seconds_bucket{le=\"1\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 40\npg_command_duration_seconds_bucket{le=\"2\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 40\npg_command_duration_seconds_bucket{le=\"5\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 40\npg_command_duration_seconds_bucket{le=\"10\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 40\npg_command_duration_seconds_bucket{le=\"+Inf\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 40\npg_command_duration_seconds_sum{host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 3.475\npg_command_duration_seconds_count{host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"SELECT\",status=\"SUCCESS\"} 40\npg_command_duration_seconds_bucket{le=\"0.001\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.005\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.01\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.02\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.03\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.04\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.05\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 8\npg_command_duration_seconds_bucket{le=\"0.1\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 14\npg_command_duration_seconds_bucket{le=\"0.2\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 18\npg_command_duration_seconds_bucket{le=\"0.5\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"1\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"2\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"5\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"10\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"+Inf\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_sum{host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 2.116\npg_command_duration_seconds_count{host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"BEGIN\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"0.001\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.005\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.01\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.02\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.03\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.04\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 0\npg_command_duration_seconds_bucket{le=\"0.05\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 12\npg_command_duration_seconds_bucket{le=\"0.1\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 17\npg_command_duration_seconds_bucket{le=\"0.2\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 18\npg_command_duration_seconds_bucket{le=\"0.5\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"1\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"2\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"5\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"10\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_bucket{le=\"+Inf\",host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 20\npg_command_duration_seconds_sum{host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 1.6620000000000001\npg_command_duration_seconds_count{host=\"localhost:5432\",database=\"node_postgres_test1\",command=\"COMMIT\",status=\"SUCCESS\"} 20\n\n# HELP pg_task_duration_seconds Timer of pg tasks\n# TYPE pg_task_duration_seconds histogram\npg_task_duration_seconds_bucket{le=\"0.001\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 0\npg_task_duration_seconds_bucket{le=\"0.005\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 0\npg_task_duration_seconds_bucket{le=\"0.01\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 0\npg_task_duration_seconds_bucket{le=\"0.02\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 0\npg_task_duration_seconds_bucket{le=\"0.03\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 0\npg_task_duration_seconds_bucket{le=\"0.04\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 0\npg_task_duration_seconds_bucket{le=\"0.05\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 8\npg_task_duration_seconds_bucket{le=\"0.1\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 14\npg_task_duration_seconds_bucket{le=\"0.2\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 18\npg_task_duration_seconds_bucket{le=\"0.5\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 20\npg_task_duration_seconds_bucket{le=\"1\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 20\npg_task_duration_seconds_bucket{le=\"2\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 20\npg_task_duration_seconds_bucket{le=\"5\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 20\npg_task_duration_seconds_bucket{le=\"10\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 20\npg_task_duration_seconds_bucket{le=\"+Inf\",host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 20\npg_task_duration_seconds_sum{host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 2.139\npg_task_duration_seconds_count{host=\"localhost:5432\",database=\"node_postgres_test1\",task=\"my-task\"} 20\n\n# HELP pg_transaction_duration_seconds Timer of pg transactions\n# TYPE pg_transaction_duration_seconds histogram\npg_transaction_duration_seconds_bucket{le=\"0.001\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.005\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.01\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.02\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.03\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.04\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.05\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.1\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 0\npg_transaction_duration_seconds_bucket{le=\"0.2\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 11\npg_transaction_duration_seconds_bucket{le=\"0.5\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 18\npg_transaction_duration_seconds_bucket{le=\"1\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 20\npg_transaction_duration_seconds_bucket{le=\"2\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 20\npg_transaction_duration_seconds_bucket{le=\"5\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 20\npg_transaction_duration_seconds_bucket{le=\"10\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 20\npg_transaction_duration_seconds_bucket{le=\"+Inf\",host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 20\npg_transaction_duration_seconds_sum{host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 5.142\npg_transaction_duration_seconds_count{host=\"localhost:5432\",database=\"node_postgres_test1\",transaction=\"my-transaction\"} 20\n```\n\n# Usage\n\n## Add Dependency\n\nAdd the following dependency to your project to download the package from [npm](https://www.npmjs.com/package/@christiangalsterer/pg-promise-prometheus-exporter).\n\n```sh\nnpm i @christiangalsterer/pg-promise-prometheus-exporter\n```\n\n## TypeScript\n\nThe following example illustrates how to use the exporter to enable monitoring for the pg-promise.\n\n```ts\nimport pgPromise, { type IInitOptions, type IMain } from 'pg-promise'\nimport { Registry, collectDefaultMetrics } from 'prom-client'\nimport { monitorPgPromise } from '@christiangalsterer/pg-promise-prometheus-exporter'\n\n...\n\n// set up pg-promise\nconst initOptions: IInitOptions = {/* initialization options */}\nconst pgp: IMain = pgPromise(initOptions)\nconst database: any = pgp(/* the connection parameter is either a configuration object or a connection string */)\n\n\n// set up the prometheus client\nconst register = new Registry();\ncollectDefaultMetrics({ register })\n\n// monitor pg-promise\nmonitorPgPromise(database, initOptions, register)\n\n...\n\n// connect to PostgreSQL *after* calling monitorPgPromise\n```\n\n## JavaScript\n\nThe following example illustrates how to use the exporter to enable monitoring for pg-promise.\n\n```js\nconst promClient = require( 'prom-client');\nconst pgPromiseExporter = require('@christiangalsterer/pg-promise-prometheus-exporter')\n\n// set up pg-promise\nconst initOptions = {/* initialization options */};\nconst pgp = require('pg-promise')(initOptions);\nconst database = pgp(/* the connection parameter is either a configuration object or a connection string */)\n\n// set up the prometheus client\nconst collectDefaultMetrics = promClient.collectDefaultMetrics;\nconst Registry = promClient.Registry;\nconst register = new Registry();\ncollectDefaultMetrics({ register });\n\n// monitor pg-promise\npgPromiseExporter.monitorPgPromise(database, initOptions, register)\n\n// connect to Postgres *after* calling monitorPgPromise\n```\n\n# Configuration\n\nThe exporter can be configured via properties specified on the optional parameter of type\n_PgPromiseExporterOptions_.\n\n## PgPromiseExporterOptions\n\n|property|Description|Example|Since |\n|---|---|---|---|\n| defaultLabels | Default labels added to each metrics. | {'foo':'bar', 'alice': 3} | 1.0.0 |\n\n# Event Handling\n\nIf there are already event handler registered for the events provided by pg-promise, the library will preserve the defined event handlers when the initOptions are initialized.\n\n# Grafana Dashboard\n\nAn example dashboard for Grafana is available [here](/docs/grafana/dashboard.json) displaying the provided metrics by the exporter.\n\nHere an example for pg-promise client metrics:\n![Grafana:pg-promise client metrics](/docs/images/grafana_pgpromise_client_1.png \"Grafana: pg-promise client metrics\")\n\nHere an example for pg-promise pool metrics:\n![Grafana:pg-promise pool metrics](/docs/images/grafana_pgpromise_pool_1.png \"Grafana: pg-promise pool metrics\")\n\nHere an example for pg-promise command metrics:\n![Grafana:pg-promise command metrics](/docs/images/grafana_pgpromise_commands_1.png \"Grafana: pg-promise command metrics\")\n\nHere an example for pg-promise task metrics:\n![Grafana:pg-promise task metrics](/docs/images/grafana_pgpromise_tasks_1.png \"Grafana: pg-promise task metrics\")\n\nHere an example for pg-promise transaction metrics:\n![Grafana:pg-promise transaction metrics](/docs/images/grafana_pgpromise_transactions_1.png \"Grafana: pg-promise transaction metrics\")\n\n# Changelog\n\nThe changes to project can be found in the [changelog](/CHANGELOG.md).\n\n# Compatibility\n\nThe following table list the compatibility of exporter versions with different pg-promise and prom-client versions.\n\n|Exporter Version|pg-promise Version|prom-client version|\n|---|---|---|\n|^1.0.0|^11.5.0|^15.0.0|\n\n# Contributions\n\nContributions are highly welcome. If you want to contribute to this project please follow the steps described in the [contribution guidelines](/CONTRIBUTING.md).\n\n# Projects Using The Exporter\n\nIf you want to support this project, please add a link to your project and/or company when you use this exporter.\n\n# Related Projects\n\nIf you are looking for a way to monitor your MongoDB Driver for Node.js you may have a look at <https://github.com/christiangalsterer/mongodb-driver-prometheus-exporter>.\n\nIf you are looking for a way to monitor KafkaJs for Node.js you may have a look at <https://github.com/christiangalsterer/kafkajs-prometheus-exporter>.\n","readmeFilename":"README.md"}