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
defmoduleMyAppWeb.SafeResolverMiddlewaredo# ...@implAbsinthe.Middlewaredefcall(resolution,resolver)doop=Enum.find(resolution.path,¤t_operation?/1)span_nometa([:safe_resolver_middleware],%{operation_name: operation_name(op),operation_type: operation_type(op)},fn->Resolution.call(resolution,resolver)end)rescueexception-># ....end# ... in another moduledefspan_nometa(event,start_and_stop_metadata,fun)do# more and less what we have today:telemetry.span([:myapp]++event,start_and_stop_metadata,fn->{fun.(),start_and_stop_metadata}end)endend
Which I would like to have a counter around the exception,
Also, I could pass :count as a measurement by using :telemetry.execute/3 but :telemetry.span/3 does not allow me to pass the measurement, and it is probably
more common to use :telemetry.span/3 than :telemetry.execute/3 I found.
So, I am confused about how to focus on just counting +1.
The text was updated successfully, but these errors were encountered:
Because measurements inside a metric may be missing, you always count a measurement. So the docs are correct, you are counting how many metrics are emitted with the duration key.
Hey there, currently I have the following module,
Which I would like to have a counter around the exception,
Readind the following,
telemetry_metrics/lib/telemetry_metrics.ex
Lines 15 to 18 in ab86164
The metrics mention that it is counting how many, but it is using
duration
measurement, which is confusing to me. Counting "duration" sounds odd.
I tried to change the measurement to
.count
, but that doesn't exist inthe measurement of the metrics so that it would fail.
I understand that I can avoid using the convention from
telemetry_metrics/lib/telemetry_metrics.ex
Lines 47 to 48 in ab86164
and I could have more control over the metrics.
Also, I could pass
:count
as a measurement by using:telemetry.execute/3
but:telemetry.span/3
does not allow me to pass the measurement, and it is probablymore common to use
:telemetry.span/3
than:telemetry.execute/3
I found.So, I am confused about how to focus on just counting +1.
The text was updated successfully, but these errors were encountered: