marotpam/zipkin-instrumentation-stripe-php
Composer 安装命令:
composer require marotpam/zipkin-instrumentation-stripe-php
包简介
Zipkin instrumentation for Stripe HTTP Client in PHP
README 文档
README
Stripe PHP client with Zipkin instrumentation
Installation
composer require marotpam/zipkin-instrumentation-stripe-php
Usage
You need to override the default HttpClient that stripe-php uses, with one that includes the Zipkin Tracer shared of your application. For further details on how to use Zipkin in your PHP applications please refer to Zipkin's official PHP library
use Stripe\ApiRequestor; use Stripe\HttpClient\CurlClient; use Stripe\Stripe; use Zipkin\Tracer; use ZipkinStripe\HttpClient; /** * @param string $stripeSecretKey Stripe API key * @param Tracer $tracer Zipkin tracer used across your application */ public function initialiseStripeClient(string $stripeSecretKey, Tracer $tracer) { Stripe::setApiKey($stripeSecretKey); $instrumentedStripeClient = new HttpClient(CurlClient::instance(), $tracer); ApiRequestor::setHttpClient($instrumentedStripeClient); }
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-20