New Relixir v0.4.5 NewRelixir.Plug.Phoenix View Source

WARNING: this module is deprecated.

A plug that instruments Phoenix controllers and records their response times in New Relic.

Inside an instrumented controller’s actions, instrumented Repo calls will be scoped under the current web transaction.

defmodule MyApp.UserController do
  use Phoenix.Controller

  plug NewRelixir.Plug.Phoenix

  alias MyApp.Repo.NewRelic, as: Repo

  def index(conn, _params) do
    users = Repo.all(User)
    # This database call is recorded as `Repo.all` under `UserController#index`.

    render(conn, "index.html", users: users)
  end
end

Link to this section Summary

Functions

Callback implementation for Plug.call/2

Callback implementation for Plug.init/1

Link to this section Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.