承接 pccomponentes/apm-guzzle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pccomponentes/apm-guzzle

最新稳定版本:0.1.3

Composer 安装命令:

composer require pccomponentes/apm-guzzle

包简介

Elastic APM for Guzzle

README 文档

README

This library supports Span traces of HTTP calls and distributed traces with Guzzle.

Installation

  1. Install via composer

    composer require pccomponentes/apm-guzzle

Usage

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

Native PHP

<?php
declare(strict_types=1);

$apmMiddleware = PcComponentes\ElasticAPM\GuzzleHttp\ElasticApmMiddleware::trace(
    $apmTracer, /** \ZoiloMora\ElasticAPM\ElasticApmTracer instance. */
);

$handler = GuzzleHttp\HandlerStack::create();
$handler->push($apmMiddleware);

$config = [
    'handler' => $handler,
];

$client = new GuzzleHttp\Client($config);

Service Container (Symfony)

http.client:
  class: GuzzleHttp\Client
  arguments:
    $config:
      handler: '@guzzle.handler'

guzzle.handler:
  class: GuzzleHttp\HandlerStack
  factory: 'GuzzleHttp\HandlerStack::create'
  calls:
    - method: push
      arguments: ['@guzzle.middleware.apm', 'trace']

guzzle.middleware.apm:
  class: Closure
  factory: 'PcComponentes\ElasticAPM\GuzzleHttp\ElasticApmMiddleware::trace'
  arguments:
    $elasticApmTracer: '@apm.tracer' # \ZoiloMora\ElasticAPM\ElasticApmTracer instance.

License

Licensed under the MIT license

Read LICENSE for more information

统计信息

  • 总下载量: 13.56k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 6
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固