new_relic v0.1.1 NewRelic.Transaction

Records information about an instrumented web transaction.

Summary

Types

The name of a repository action

Elapsed time in microseconds

The name of a model

The name of a query

t()

A New Relixir transaction context

Functions

Finishes a web transaction

Records a database query for the current web transaction

Creates a new web transaction

Updates the name of an existing transaction

Types

action()
action :: atom

The name of a repository action.

interval()
interval :: non_neg_integer

Elapsed time in microseconds.

model()

The name of a model.

query()

The name of a query.

t()
t

A New Relixir transaction context.

Functions

finish(transaction)
finish(t) :: :ok

Finishes a web transaction.

This method should be called just after processing a web transaction. It will record the elapsed time of the transaction.

record_db(transaction, query, elapsed)
record_db(t, query, interval) :: :ok

Records a database query for the current web transaction.

The query name can either be provided as a raw string or as a tuple containing a model and action name.

start(name)
start(String.t) :: t

Creates a new web transaction.

This method should be called just before processing a web transaction.

update_name(transaction, new_name)
update_name(t, String.t) :: t

Updates the name of an existing transaction

This method allows you to specify the name of a transaction after start to facilitate the use case where the transaction name is not known at start time.