Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pccomponentes/apm-twig

Elastic APM for Twig
https://github.com/pccomponentes/apm-twig

apm elasticsearch twig twig-extension

Last synced: about 2 months ago
JSON representation

Elastic APM for Twig

Awesome Lists containing this project

README

        

# Elastic APM for Twig

This library supports Span traces of [Twig](https://github.com/twigphp/Twig) renderings.

## Installation

1) Install via [composer](https://getcomposer.org/)

```shell script
composer require pccomponentes/apm-twig
```

## Usage

In all cases, an already created instance of [ElasticApmTracer](https://github.com/zoilomora/elastic-apm-agent-php) is assumed.

### Service Container (Symfony)

```yaml
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](http://opensource.org/licenses/MIT)

Read [LICENSE](LICENSE) for more information