Current section

Files

Jump to
new_relic_agent lib new_relic other_transaction.ex
Raw

lib/new_relic/other_transaction.ex

defmodule NewRelic.OtherTransaction do
@moduledoc false
def start_transaction(category, name) do
NewRelic.Transaction.Reporter.start_transaction(:other)
NewRelic.DistributedTrace.start(:other)
NewRelic.add_attributes(
pid: inspect(self()),
start_time: System.system_time(),
start_time_mono: System.monotonic_time(),
other_transaction_name: "#{category}/#{name}"
)
:ok
end
def stop_transaction() do
NewRelic.Transaction.Reporter.stop_transaction(:other)
:ok
end
end