tdeekens / promster

⏰A Prometheus exporter for Hapi, express and Marble.js servers to automatically measure request timings 📊

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in @promster/metrics doc?

katmatt opened this issue · comments

After reading the section https://github.com/tdeekens/promster#promstermetrics of the readme.md I'm a little bit confused: The section is called @promster/metrics, but in the example snippet you do:

const { getSummary, getContentType } = require('@promster/express');

I've seen that @promster/express and @promster/hapi export these functions too. But why do I then have to use/install @promster/metrics at all?

Nice catch. Sorry about the confusion. It's correct to import from @promster/express. It under the hood provides things from @promster/metrics but you:

  1. Don't have to know nor care
  2. Versions can't get out of sync of both packages

You don't have to install @promster/metrics at all. I will fix that in the docs.

Thanks a lot 😄