EctoJobScheduler.NewRelic.JobInstrumenter (ecto_job_scheduler v1.3.0) View Source

Tool for capture metrics to NewRelic.

Link to this section Summary

Functions

Execute a function and capture metrics to NewRelic from it. The metrics is grouped with name parameter.

Link to this section Functions

Link to this function

transaction(name, function)

View Source

Specs

transaction(
  name :: String.t(),
  function :: (() -> {:error, term()} | any() | no_return())
) :: term()

Execute a function and capture metrics to NewRelic from it. The metrics is grouped with name parameter.

Example of use:

NewRelic.JobInstrumenter.transaction("job/1", fn -> ... end)