Adds readme entry on Plug.Telemetry (#20)
* adds entry about Plug.Telemetry * Adds reference to phoenix endpoint template
This commit is contained in:
parent
2e45dc6a63
commit
3334b07b9d
|
@ -27,3 +27,18 @@ def deps do
|
|||
end
|
||||
```
|
||||
|
||||
## Note on phoenix integration
|
||||
|
||||
`OpentelemetryPhoenix` requires phoenix to use `Plug.Telemetry` in order to correctly trace endpoint calls.
|
||||
|
||||
The `endpoint.ex` file should look like:
|
||||
```Elixir
|
||||
defmodule MyApp.Endpoint do
|
||||
use Phoenix.Endpoint, otp_app: :my_app
|
||||
...
|
||||
plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint]
|
||||
...
|
||||
end
|
||||
```
|
||||
The [Phoenix endpoint.ex template](https://github.com/phoenixframework/phoenix/blob/v1.6.0/installer/templates/phx_web/endpoint.ex#L39) can be used as a reference
|
||||
|
||||
|
|
Loading…
Reference in New Issue