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
I have the instrumenter working fine w/ default settings and I see my Ecto metrics come through prometheus:
# TYPE ecto_db_query_duration_microseconds histogram
# HELP ecto_db_query_duration_microseconds The time spent executing the DB query in microseconds.
ecto_db_query_duration_microseconds_bucket{result="ok",le="10"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="100"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="1000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="10000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="100000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="300000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="500000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="750000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="1000000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="1500000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="2000000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="3000000"} 49
ecto_db_query_duration_microseconds_bucket{result="ok",le="+Inf"} 49
ecto_db_query_duration_microseconds_count{result="ok"} 49
ecto_db_query_duration_microseconds_sum{result="ok"} 89.833
In looking for a way to identify which queries are taking how long, I am trying to implement the label_value function as suggested and just logging the 2nd argument so I can see what I can use:
defmodule App.Repo.Instrumenter do
use Prometheus.EctoInstrumenter
def label_value(:source, log_entry) do
IO.
IO.inspect log_entry
true
end
end
But it doesn't seem to ever enter this function... It doesn't log anything and I don't see "source" in the labeling as I would expect...
Is there any additional steps to get this to work?
The text was updated successfully, but these errors were encountered:
I have the instrumenter working fine w/ default settings and I see my Ecto metrics come through prometheus:
In looking for a way to identify which queries are taking how long, I am trying to implement the
label_value
function as suggested and just logging the 2nd argument so I can see what I can use:But it doesn't seem to ever enter this function... It doesn't log anything and I don't see "source" in the labeling as I would expect...
Is there any additional steps to get this to work?
The text was updated successfully, but these errors were encountered: