Closed prem-prakash closed 5 years ago
Thank you for the report. We've recently reworked some parts of custom instrumentation to play nicer. The function annotations were clever, but caused some issues, and the next release will provide a midpoint option for instrumentation. I'm glad you have the inside-the-function version of tracing working.
To clarify, the code compiled ok, but failed at runtime?
yes the code compiled ok but failed at runtime by becoming unresponsive, or by changing the response of the functions, putting them inside a list with "do" as first item [do:, response]
FYI - we're deprecating the @transaction
and @timing
approach to instrumentation, starting with the freshly released 0.4.1 version of the agent.
Now, prefer using a new macro called deftiming
:
@timing_opts [category: "Memcached", name: "incr"]
deftiming incr(key) do
# ...
end
@cschneid - we need to update the help docs, correct?
http://help.apm.scoutapp.com/#timing-functions-and-blocks-of-code
It looks like both the docs linked above and those on Hex.pm (e.g. the code comments) are out of date with regard to the deprecations.
@jstr - I just looked at our generated docs and it looks ok. We do still document the @transaction
style, which we should further deemphasise, but the newer style deftransaction
is there as the recommended version.
Can you point to what you're seeing?
The docs have been updated to reflect the deprecation of @timing
in favor of the new implementation and style. If it is unclear, please let us know! 🙂
the syntax bellow does not work
tried on a module:
the erlang VM starts to consume memory and the module became unresponsive
changing for this syntax it works fine