appsignal_phoenix v2.0.0-beta.2 Appsignal.Phoenix.View

AppSignal.Phoenix.View instruments template rendering.

Installation

To install Appsignal.Phoenix.View into your Phoenix application, use Appsignal.Phoenix.View in your application's view function in the web module, after the existing use Phoenix.View line:

defmodule AppsignalPhoenixExampleWeb do

# ...

def view do
  quote do
    use Phoenix.View,
      root: "lib/appsignal_phoenix_example_web/templates",
      namespace: AppsignalPhoenixExampleWeb

    use Appsignal.Phoenix.View # <- Add this line

    # Import convenience functions from controllers
    import Phoenix.Controller, only: [get_flash: 1, get_flash: 2, view_module: 1]

    # Include shared imports and aliases for views
    unquote(view_helpers())
  end
end
# ...

end