Packages
appsignal_phoenix
2.0.0-beta.4
2.8.1
2.8.0
2.7.0
2.6.0
2.5.1
2.5.0
2.4.1
2.4.0
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.14
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
retired
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
2.0.0-beta.6
2.0.0-beta.5
2.0.0-beta.4
2.0.0-beta.3
2.0.0-beta.2
2.0.0-beta.1
2.0.0-alpha.4
2.0.0-alpha.3
2.0.0-alpha.2
2.0.0-alpha.1
AppSignal's Phoenix instrumentation instruments calls to Phoenix applications to gain performance insights and error reporting
Current section
Files
Jump to
Current section
Files
appsignal_phoenix
README.md
README.md
# Appsignal.Phoenix
> ⚠️ **NOTE**: Appsignal.Phoenix is part of an upcoming version of Appsignal
> for Elixir, and hasn't been officially released. Aside from beta testing, we
> recommend using [the current version of AppSignal for
> Elixir](https://github.com/appsignal/appsignal-elixir/tree/main) instead.
AppSignal's Phoenix instrumentation instruments calls to Phoenix applications
to gain performance insights and error reporting.
## Installation
To install `Appsignal.Phoenix` into your Phoenix application, first add
`:appsignal_phoenix` to your project's dependencies:
``` elixir
defp deps do
{:appsignal_phoenix, "~> 2.0.0-beta.1"},
end
```
After that, follow the [installation instructions for Appsignal for
Elixir](https://github.com/appsignal/appsignal-elixir/tree/tracing).
Then, `use Appsignal.Phoenix` in your application's endpoint module:
``` elixir
defmodule AppsignalPhoenixExampleWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :appsignal_phoenix_example
use Appsignal.Phoenix
# ...
end
```
Finally, `use Appsignal.Phoenix.View` in the `view/0` function in your app's web
module.
``` elixir
defmodule AppsignalPhoenixExampleWeb do
# ...
def view do
quote do
use Phoenix.View,
root: "lib/appsignal_phoenix_example_web/templates",
namespace: AppsignalPhoenixExampleWeb
use Appsignal.Phoenix.View
# 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
```