I am very much enjoying using GitHub - deadtrickster/prometheus-plugs: Prometheus.erl Elixir Plugs for all the conveniences out of the box, however, I would like to start adding my own telemetry events to be exposed via Prometheus too. Seems like TelemetryMetricsPrometheus — telemetry_metrics_prometheus v1.0.0 specifically TelemetryMetricsPrometheus.Core
is the way to go. However, I’m not sure if it’s possible to make both of these interoperate. My ideal solution would be to define a list of telemetry events like so:
defp metrics, do:
[
counter("http.request.count"),
sum("http.request.payload_size", unit: :byte),
last_value("vm.memory.total", unit: :byte)
]
and have the appear along side the metrics already gathered by prometheus_plugs
and prometheus_phoenix