open-feature/otel-hook
Composer 安装命令:
composer require open-feature/otel-hook
包简介
The OpenTelemetry hook package for OpenFeature
README 文档
README
Overview
OpenTelemetry is an open specification for distributed tracing, metrics, and logging. It defines a semantic convention for feature flagging which is utilized in this hook to report flag evaluations.
This package also builds on various PSRs (PHP Standards Recommendations) such as the Logger interfaces (PSR-3) and the Basic and Extended Coding Standards (PSR-1 and PSR-12).
Autoloading
This package supports Composer autoloading. Thus, simply installing the package is all you need in order to immediately get started with OpenTracing for OpenFeature! Examples are provided that showcase the simple setup as well. Check out the Usage section for more info.
OpenTelemetry Package Status
The OpenTelemetry package for PHP is still in beta, so there could be changes required. However, it exposes global primitives for span retrieval that should not require any configuration upfront for the provider to just work.
Installation
composer require open-feature/otel-hook
Usage
The OpenTelemetryHook should be registered to the OpenFeatureAPI globally for use across all evaluations.
It makes use of the open-telemetry/api packages Globals utility for current span retrieval, thus has
no dependency on configuration or injection of tracers.
use OpenFeature\Hooks\OpenTelemetry\OpenTelemetryHook; OpenTelemetryHook::register();
For more information on OpenTelemetry, check out their documentation.
For more examples, see the examples.
Development
PHP Versioning
This library targets PHP version 8.0 and newer. As long as you have any compatible version of PHP on your system you should be able to utilize the OpenFeature SDK.
This package also has a .tool-versions file for use with PHP version managers like asdf.
Installation and Dependencies
Install dependencies with composer install. composer install will update the composer.lock with the most recent compatible versions.
We value having as few runtime dependencies as possible. The addition of any dependencies requires careful consideration and review.
Testing
Run tests with composer run test.
open-feature/otel-hook 适用场景与选型建议
open-feature/otel-hook 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 12 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「provider」 「opentelemetry」 「otel」 「featureflags」 「featureflagging」 「openfeature」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 open-feature/otel-hook 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 open-feature/otel-hook 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 open-feature/otel-hook 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Time provider, providing consistent current date, time, datetime and timezone across the request.
An Zend Expressive module for loading ZF2 or ZF3 modules.
OpenTelemetry auto-instrumentation for PHP Session functions
A fast and intuitive dependency injection container.
OpenTelemetry SDK rule-based sampler
The Azure package for opentelemetry-php
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2022-12-27