New Relixir v0.1.0 NewRelixir.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

Types

action :: atom

The name of a repository action.

interval :: non_neg_integer

Elapsed time in microseconds.

model :: String.t

The name of a model.

query :: String.t | {model, action}

The name of a query.

t

A New Relixir transaction context.

Functions

finish(transaction)

Specs

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)

Specs

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)

Specs

start(String.t) :: t

Creates a new web transaction.

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