AppSignal v2.0.0-beta.10 Appsignal.Instrumentation View Source
Link to this section Summary
Link to this section Functions
Instrument a function.
def call do
Appsignal.instrument("foo.bar", fn ->
:timer.sleep(1000)
end)
end
When passing a function that takes an argument, the function is called with the created span to allow adding extra information.
def call(params) do
Appsignal.instrument("foo.bar", fn span ->
Appsignal.Span.set_sample_data(span, "params", params)
:timer.sleep(1000)
end)
end