You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current exporter plug is serving metrics on given path (/metrics by default), or passing the conn. This is for plug pipeline... and it doesn't work for phoenix router!
# phoenix example# in endpointplugMy.PrometheusExporter.
This works... but it sounds strange. For example, to change the path, I need to set it at application config of the exporter module, not when using it.
One option is to add plug option :path.. but that is wrong approach, since plug can be composable!
Instead of we make this as "app" like plug having lots of configs... we can just have very simple exporter plug use forward mechanism. (Plug - forward/2 / Phoenix - forward/4).
In this case, path for metrics is configured at router, not on application config of the exporter module. Also the exporter plug runs only on that path (not for all requests as in pipeline)
The text was updated successfully, but these errors were encountered:
The current exporter plug is serving metrics on given path (
/metrics
by default), or passing the conn. This is for plug pipeline... and it doesn't work for phoenix router!This works... but it sounds strange. For example, to change the path, I need to set it at application config of the exporter module, not when using it.
One option is to add plug option
:path
.. but that is wrong approach, since plug can be composable!Instead of we make this as "app" like plug having lots of configs... we can just have very simple exporter plug use forward mechanism. (Plug -
forward/2
/ Phoenix -forward/4
).In this case, path for metrics is configured at router, not on application config of the exporter module. Also the exporter plug runs only on that path (not for all requests as in pipeline)
The text was updated successfully, but these errors were encountered: