Skip to content

PcComponentes/apm-twig

Repository files navigation

Elastic APM for Twig

This library supports Span traces of Twig renderings.

Installation

  1. Install via composer

    composer require pccomponentes/apm-twig

Usage

In all cases, an already created instance of ElasticApmTracer is assumed.

Service Container (Symfony)

twig.extension.apm:
  class: PcComponentes\ElasticAPM\Twig\Extension\ApmExtension
  arguments:
    $profile: '@twig.profile'
    $elasticApmTracer: '@apm.tracer' # \ZoiloMora\ElasticAPM\ElasticApmTracer instance.
  public: false
  tags:
    - { name: twig.extension }

License

Licensed under the MIT license

Read LICENSE for more information