We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to report a span that, er, spans over an asynchronous call to a gen_statem, using gen_statem:send_request() and gen_statem:check_response().
gen_statem
gen_statem:send_request()
gen_statem:check_response()
It would be useful if there were telemetry:start_span() and telemetry:stop_span() functions for this use case.
telemetry:start_span()
telemetry:stop_span()
An example without gen_statem might make this clearer:
Span = telemetry:start_span([worker, processing], StartMetadata), Parent = self(), {MRef, Pid} = spawn_monitor(fun() -> Result = do_some_work(), Parent ! {reply, Result} end), receive {reply, Result} -> telemetry:stop_span([worker, processing], Span); {'DOWN', Ref, process, Pid, Error} when Error /= normal -> telemetry:error_span([worker, processing], Span) end.
...something like that, anyway.
Maybe the EventPrefix ought to be stashed in the span, to avoid repetition.
EventPrefix
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to report a span that, er, spans over an asynchronous call to a
gen_statem
, usinggen_statem:send_request()
andgen_statem:check_response()
.It would be useful if there were
telemetry:start_span()
andtelemetry:stop_span()
functions for this use case.An example without
gen_statem
might make this clearer:...something like that, anyway.
Maybe the
EventPrefix
ought to be stashed in the span, to avoid repetition.The text was updated successfully, but these errors were encountered: