pccomponentes / apm-mongodb
Elastic APM for MongoDB
0.1.3
2020-07-15 11:00 UTC
Requires
- php: ^7.4
- ext-json: *
- ext-mongodb: *
- mongodb/mongodb: ^1.6
- zoilomora/elastic-apm-agent-php: ^0.1
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-15 19:56:23 UTC
README
此库支持使用 MongoDB 的命令跟踪 Span。
安装
-
通过 composer 安装
composer require pccomponentes/apm-mongodb
使用方法
在所有情况下,假设已创建 ElasticApmTracer 的实例。
原生 PHP
<?php declare(strict_types=1); use function MongoDB\Driver\Monitoring\addSubscriber; $commandSubscriber = new PcComponentes\ElasticAPM\MongoDB\Driver\Monitoring\CommandSubscriber( $apmTracer, /** \ZoiloMora\ElasticAPM\ElasticApmTracer instance. */ ); addSubscriber($commandSubscriber);
许可证
许可协议为 MIT
阅读 LICENSE 以获取更多信息