PromPHP / prometheus_client_php

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

How InMemory() Work ? #125

Closed Alitindrawan24 closed 1 year ago

Alitindrawan24 commented 1 year ago

I'm currently trying to use this package and use InMemory() to store metrics. But whenever I access the /metrics endpoint, all metrics are empty. Previously I tried with php Redis and it worked fine. Thank You

LKaemmerling commented 1 year ago

Hey @Alitindrawan24,

sorry for the late reply:

The InMemory Storage stores the metrics only in an array, so it is only available as long as the process is living (e.g. only when you make the request).

Alitindrawan24 commented 1 year ago

Hello @LKaemmerling okay thank you for the explanation