Jimdo / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
281 stars 213 forks source link

Minor enhancement: Adds flush() method as Adapter's interface #71

Closed jitendra-1217 closed 5 years ago

jitendra-1217 commented 6 years ago

Why?

There could be case, when one would want to flush underlying adapter's contents. Usually one wouldn't do it, but I want to have a way of doing so in case of need(though rare).

For now there were methods but with different names (e.g. flushAPC(), flushRedis() etc.).


Change log

This PR adds a consistent interface method for adapters, i.e. flush().

I haven't removed old methods, just calling them from above new method.


Awaiting your response on whether this change would be acceptable.

bracki commented 6 years ago

LGTM. Makes sense.

jitendra-1217 commented 6 years ago

Gentle reminder, please.

jlis commented 6 years ago

+1

jitendra-1217 commented 5 years ago

Closing this as I do not see any reply/interest/progress on the pr.

NoelDavies commented 5 years ago

Shame this was dropped. the currently flush implementations are ... for want of a better word, bad-ish. Especially since there's an adapter interface available.

I don't mind creating a PR for this as long as somebody accepts it.

jitendra-1217 commented 5 years ago

@NoelDavies : Agree. I didn't want to create a fork as this is listed unofficially and already tested/popular.

NoelDavies commented 5 years ago

We could always just add it in the interface and have the existing methods still there, have the new PR use the new flush method in order to keep BC

jlis commented 5 years ago

Too bad this thing is kinda dead since the Jimdo guys/repo owners don't care about the PRs.

NoelDavies commented 5 years ago

I would fork it etc, but I really don't want to maintain this project myself 😆