jiyis/php-zipkin
Composer 安装命令:
composer require jiyis/php-zipkin
包简介
Zipkin library for laravel
README 文档
README
This is an unofficial PHP library for OpenZipkin.
Status
Incomplete, only has one transport with zero integrations. This library contains a very minimal implementation for just sending spans to zipkin.
Getting started
The recommended way to install PHP-Zipkin is through Composer
composer require drefined/php-zipkin
Example usage
<?php $client = new \GuzzleHttp\Client(); $logger = new \Drefined\Zipkin\Transport\HTTPLogger($client); $tracer = new \Drefined\Zipkin\Tracer($logger, 1.0, true); $endpoint = new \Drefined\Zipkin\Core\Endpoint('127.0.0.1', 8080, 'test-trace'); $trace = new \Drefined\Zipkin\Core\Trace($tracer, $endpoint); $trace->createNewSpan('test-server-trace'); $trace->record( [Annotation::generateServerRecv()], [BinaryAnnotation::generateString('server.request.uri', '/server')] ); $trace->record( [Annotation::generateServerSend()], [BinaryAnnotation::generateString('server.response', 200)] );
Laravel integration (simple)
Add middleware and service provider in proper locations.
<?php // laravel-project/app/Http/Kernel.php namespace App\Http; use ... use Drefined\Zipkin\Instrumentation\Laravel\Middleware\EnableZipkinTracing; class Kernel extends HttpKernel { ... protected $middleware = [ ... EnableZipkinTracing::class, ]; ... }
<?php // laravel-project/config/app.php use Drefined\Zipkin\Instrumentation\Laravel\Providers\ZipkinTracingServiceProvider; return [ ... 'providers' => [ ... ZipkinTracingServiceProvider::class, ], ... ];
Todo
- Add Complete Laravel integration (currently supports a simple implementation without app environment configuration)
- Add Symfony integration
- Add Redis wrapper
- Add HTTP wrapper
- Add PDO wrapper
- Add Scribe transport
- Add Kafka transport
Inspired By
Reference
Generating PHP thrift classes
- ls thrift/ | xargs -I {} thrift --gen php thrift/{}
License
Contributors
- David Phruksukarn
jiyis/php-zipkin 适用场景与选型建议
jiyis/php-zipkin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.04k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 08 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「tracer」 「zipkin」 「tracing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jiyis/php-zipkin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jiyis/php-zipkin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jiyis/php-zipkin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple zipkin implementation for php.
Symfony Opentracing bundle extension for Zipkin tracers
telemetry framework for php
Crawl, match, parse IP or IP range, check if IP or range is in another range. Support IPv4, IPv6, IP Interval, Wildcard and CIDR. Check if IP is Cloudflare node IP, Google bot IP. 爬取,正则匹配,解析 IP 和 IP 范围,检测 IP 或范围是否在另一个范围中。支持 IPv4,IPv6,区间、通配符或 CIDR 表示的 IP 范围。检测 IP 是否是 Cloudflare 节点或 Google 漫游器 IP
Alfabank REST API integration
Zipkin tracing library based on Opentracing standard
统计信息
- 总下载量: 5.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-10