akoutmos / prom_ex

An Elixir Prometheus metrics collection library built on top of Telemetry with accompanying Grafana dashboards
MIT License
596 stars 104 forks source link

[BUG] Error message on app startup, if PromEx is started after the Endpoint #194

Closed Ninigi closed 1 year ago

Ninigi commented 1 year ago

Describe the bug

RuntimeError: ** (RuntimeError) could not find persistent term for endpoint MyApp.Endpoint. Make sure your endpoint is started and note you cannot access endpoint functions at compile-time

To Reproduce Steps to reproduce the behavior:

add PromEx to the children for the supervisor as described in current README

children = [
  MyApp.PromEx,
  MyAppWeb.Endpoint,
  # ...
]

Expected behavior Since PromEx relies on the Endpoint, the Endpoint should be started before PromEx.

Environment Doesn't matter

Additional context It is not going to bother you, until you have something like AppSignal giving you the same error message on every deploy.

tmartin8080 commented 1 year ago

Closing, addressed in #195