jochen-schweizer / express-prom-bundle

express middleware with standard prometheus metrics in one bundle
MIT License
303 stars 67 forks source link

Helped needed... #79

Closed RichardWright closed 3 years ago

RichardWright commented 3 years ago

Hi!

I compared the metrics that came out of this and another project and this project makes alot of sense. I've decided to dump our current implementations and move over to this project - however due to a registry already beingin place (this one - https://www.npmjs.com/package/@opentelemetry/exporter-prometheus) I'm trying to get the PrometheusExporter in as a promRegistry.

Not much joy though.

The error. Type 'PrometheusExporter' is missing the following properties from type 'Registry': metrics, clear, resetMetrics, registerMetric, and 7 more.ts(2740) index.d.ts(37, 5): The expected type comes from property 'promRegistry' which is declared here on type 'Opts'

Have you ever integrated this project with opentelemetries prometheus exporter?

disjunction commented 3 years ago

I have no experience with @opentelemetry/exporter-prometheus. Is it a real functional problem or just the typing is wrong somewhere? Did you try to force the type cast and see if it works at all?

RichardWright commented 3 years ago

They look totally different.

I think this, combined with the difference between prom client and open telem has made me realise I need to move away from it and use this project instead. Issue solved!