spacespell/elastic-apm-bundle

Elastic APM Bundle

安装数: 3,599

依赖者: 0

推荐者: 0

安全: 0

星标: 100

关注者: 2

分支: 3

开放问题: 0

类型:symfony-bundle

v1.0.0-rc 2020-01-21 05:44 UTC

This package is auto-updated.

Last update: 2024-09-07 10:56:39 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

ElasticApmBundle 是一个 symfony 插件,允许您通过向 elastic apm 服务器实例发送事务和指标来跟踪您的 symfony 应用程序的性能。

安装

$ composer require spacespell/elastic-apm-bundle
  • 如果您使用 Symfony Flex,那么在 composer install 之后,该插件将自动在您的 config/bundles.php 中启用,否则您应手动启用此插件。

  • 在您的 config/packages/ 中创建配置文件 elastic_apm.yaml

elastic_apm:
    enabled: true
    agent:
        appName: '' # Name of this application, Required
        serverUrl: 'http://127.0.0.1:8200' # APM Server Endpoint, Default: 'http://127.0.0.1:8200'
        secretToken: null # Secret token for APM Server, Default: null
        environment: 'development' # Environment, Default: 'development'

自定义

事务跟踪黑名单和白名单

异常跟踪黑名单和白名单

事务名称

共享上下文

用户上下文

配置参考

elastic_apm:
    enabled: true
    agent:
        appName: '' # Name of this application, Required
        serverUrl: 'http://127.0.0.1:8200' # APM Server Endpoint, Default: 'http://127.0.0.1:8200'
        secretToken: null # Secret token for APM Server, Default: null
        environment: '' # Environment, Default: 'development'
    transactions:
        include:
            # - App\Controller\API\OAuthController::tokenAction
            # - App\Controller\Backend\DashboardController::*
        exclude:
            # - web_profiler.controller.profiler::toolbarAction
            # - web_profiler.controller.profiler::panelAction
            # - App\Controller\Backend\UserController::loginAction
            # - App\Controller\Backend\ReportController::*
    exceptions:
        include:
        exclude:
            # - Symfony\Component\Security\Core\Exception\AccessDeniedException

许可证

Apache-2.0 许可证。有关更多信息,请参阅 许可证文件