# `ScoutApm.Instruments.HEExEngine`

Scout APM instrumentation for Phoenix HEEx templates (.heex files).

This engine wraps `Phoenix.LiveView.HTMLEngine` to provide automatic timing
instrumentation for HEEx template rendering.

## Requirements

- Phoenix LiveView 0.17+
- Phoenix 1.6+

## Configuration

Add to your `config/config.exs`:

    config :phoenix, :template_engines,
      heex: ScoutApm.Instruments.HEExEngine

The engine will automatically instrument all `.heex` template files in your application.

## Notes

- This module is only compiled when `Phoenix.LiveView.HTMLEngine` is available
- Layout templates are marked as non-scopable to prevent them from becoming transaction names
- Compatible with both Phoenix 1.6 (web/templates) and 1.7+ (lib/my_app_web/controllers) directory structures

# `compile`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
