AppSignal v0.1.0 Appsignal.Phoenix.TemplateInstrumenter
Instrument Phoenix template engines
As documented in the phoenix guidelines, The Appsignal
Elixir library comes with default template engines to instrument
renders to .eex
and .exs
template files.
When you use another template engine in your Phoenix project, you can create a module which wraps the template renderer to also instrument those template files.
To instrument the phoenix_markdown library, you would create the following renderer engine module:
defmodule MyApp.InstrumentedMarkdownEngine do
use Appsignal.Phoenix.TemplateInstrumenter, engine: PhoenixMarkdown.Engine
endmodule
And then register the .md
extension as a template as follows:
config :phoenix, :template_engines,
md: MyApp.InstrumentedMarkdownEngine