Add idle_time measurement (#66)
Co-authored-by: Tristan Sloughter <t@crashfast.com>
This commit is contained in:
parent
44fd2a6871
commit
a7b0c04aaf
|
@ -81,7 +81,7 @@ defmodule OpentelemetryEcto do
|
||||||
attributes =
|
attributes =
|
||||||
measurements
|
measurements
|
||||||
|> Enum.reduce(%{}, fn
|
|> Enum.reduce(%{}, fn
|
||||||
{k, v}, acc when not is_nil(v) and k in [:decode_time, :query_time, :queue_time] ->
|
{k, v}, acc when not is_nil(v) and k in [:decode_time, :query_time, :queue_time, :idle_time] ->
|
||||||
Map.put(acc, String.to_atom("#{k}_#{time_unit}s"), System.convert_time_unit(v, :native, time_unit))
|
Map.put(acc, String.to_atom("#{k}_#{time_unit}s"), System.convert_time_unit(v, :native, time_unit))
|
||||||
|
|
||||||
_, acc ->
|
_, acc ->
|
||||||
|
|
Loading…
Reference in New Issue