Q1:
I’m using
{:prometheus_ex, "~> 2.0"},
{:prometheus_phoenix, "~> 1.2.0"},
and doc for GitHub - prometheus-erl/prometheus-phoenix at v1.2.0 · GitHub states that it has 2 metrics:
phoenix_controller_call_duration_microseconds- Whole controller pipeline execution time.phoenix_controller_render_duration_microseconds- View rendering time.
Instead, the /metrics page shows me
# TYPE phoenix_controller_call_duration_microseconds histogram
# HELP phoenix_controller_call_duration_microseconds Whole controller pipeline execution time in microseconds.
# TYPE phoenix_controller_render_duration_microseconds histogram
# HELP phoenix_controller_render_duration_microseconds View rendering time in microseconds.
# TYPE phoenix_channel_receive_duration_microseconds histogram
# HELP phoenix_channel_receive_duration_microseconds Phoenix channel receive handler time in microseconds
# TYPE phoenix_channel_join_duration_microseconds histogram
# HELP phoenix_channel_join_duration_microseconds Phoenix channel join handler time in microseconds
Where do they come from? They have no values. After using prometheus_phoenix 1.2.1 metrics are the same but WITH values. Where does all that come from?
Q2:
my config for PhoenixInstrumenter:
config :prometheus, AppWeb.PhoenixInstrumenter,
controller_call_labels: [:controller, :action],
duration_buckets: [10, 25, 50, 100, 250, 500, 1000, 2500, 5000,
10_000, 25_000, 50_000, 100_000, 250_000, 500_000,
1_000_000, 2_500_000, 5_000_000, 10_000_000, 20_000_000, 30_000_000],
registry: :default,
duration_unit: :microseconds
Why the key is called controller_call_labels? Other sample configs have smth like
config :prometheus, AppWeb.PipelineInstrumenter,
labels: [:status_class, :method, :host, :scheme, :request_path],
but not controller_call_labels. How is it set?
Q3:
If I add/remove values from duration_buckets: they change after a certain period of time. Are they cached somewhere?
Thanks ahead for the answers!


















