Share api with prom-client
SimenB opened this issue · comments
The semi-official node.js client for prometheus (as in, linked in Prometheus' docs) is prom-client. If we adopted this library at work, we'd still use that for server-side metrics, but using two different APIs in the same language would be sorta weird. Would you be opposed to changing your api to more closely resemble prom-client
's?
From a first look, the difference is mostly in how labels are handled, and how metrics are constructed.
If interested, I could probably provide a PR
@SimenB It might be possible to expose a compatible API via a wrapped module. An explicit goal of this project, however, is to remain environment-agnostic, so we don't want to add any defaultMetrics
or gateway pushing now.
That said, I'm thinking a separate import, such as require('promjs/prom-client-compatible')
might be do-able.
Yeah, just a matching API for metrics was what I meant 😄