Apologies in advance. I am new to prometheus. I have instrumented my phoenix app and in particular a gen server with Prometheus metrics. I labeled the counters with _count at the end to be consistent with fly. When I visit app/metrics page on my app i see the counters (and the rest of the metrics from fly). When I visit app:9091/metrics I see the counters briefly (10 seconds) and then they go away with a connection reset message (not sure about this)
I updated toml to [metrics] (as recommended somewhere)
port = 9091
path = “/metrics”
I added plug Alzheimer.Metrics.PrometheusExporter. (in endpoint.ex)
I wrote the code for above plug:.
When I visit app/metrics I see my counters at the top of the list:
TYPE alzheimer_displays_managed_count counter
HELP alzheimer_displays_managed_count Displays under management.
alzheimer_displays_managed_count{caller=“826948d7-1321-44fe-bc7c-9b5095dfca15”} 1
TYPE alzheimer_posts_displayed_count counter
HELP alzheimer_posts_displayed_count Posts shown for a display.
alzheimer_posts_displayed_count{caller=“826948d7-1321-44fe-bc7c-9b5095dfca15”} 255
However when I visit
https://fly-metrics.net/d/fly-app/fly-app?editPanel=33
and try to add a panel I don’t see my metrics in the metrics browser…
Am I doing something wrong? Do I need to use my own version of grafana? Apologies that I am amateur at this I just don’t know if I should be able to see my custom metrics in fly-metrics.net
Another question is should the metrics be at /metrics hidden and just available at app:9091/metrics. (or put another way, should my metrics be visible to everyone?)