Add idle_time measurement (#66)

Co-authored-by: Tristan Sloughter <t@crashfast.com>
This commit is contained in:
Ho-Yon Mak 2022-03-14 16:22:22 +00:00 committed by GitHub
parent 44fd2a6871
commit a7b0c04aaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ defmodule OpentelemetryEcto do
attributes =
measurements
|> 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))
_, acc ->