bfmatei / apollo-prometheus-exporter

Plugin for Apollo Server to export metrics in Prometheus format
MIT License
55 stars 29 forks source link

Support prom-client v15 #66

Open cbix opened 11 months ago

cbix commented 11 months ago

The peer-dependency prom-client recently released version 15.0.0, however when installing that I get

npm ERR! Could not resolve dependency:
npm ERR! peer prom-client@"^12.0.0 || ^13.0.0 || ^14.0.0" from @bmatei/apollo-prometheus-exporter@3.0.0
npm ERR! node_modules/@bmatei/apollo-prometheus-exporter
npm ERR!   @bmatei/apollo-prometheus-exporter@"^3.0.0" from the root project

I didn't test for full compatibility yet but if it's not a breaking change, it might be sufficient to just add || ^15.0.0.

glensc commented 10 months ago

@cbix so send a PR?

maybe even better add >= 15, so, that if some version is broken it can't be dealt with, otherwise assume working.

lala7573 commented 8 months ago

It doesn't work when you simply update the version. It has type error

@bmatei/apollo-prometheus-exporter/context.d.ts:31:28 - error TS2314: Generic type 'DefaultMetricsCollectorConfiguration<T>' requires 1 type argument(s).
Jhonas0403 commented 7 months ago

I have the same error, at the moment I work with prom-client v.14.0.2 but when we work with prom client v15.0.0 we have the same error of @lala7573

tigerabrodi commented 1 month ago

its interesting how they're using version 3 of prometheus and 15.1 of prom-client: https://github.com/aahlborn/omnivore/blob/67c5de6512ebdf7bf3b03390d928507f34a54a41/packages/api/package.json