kabiroman/adaptive-entity-manager-opentelemetry-bridge
Composer 安装命令:
composer require kabiroman/adaptive-entity-manager-opentelemetry-bridge
包简介
OpenTelemetry bridge for Adaptive Entity Manager - adds distributed tracing and observability to entity lifecycle operations
README 文档
README
This Symfony bundle automatically creates OpenTelemetry spans for persist, update, and remove operations from kabiroman/adaptive-entity-manager-bundle and resolves manager names based on entity namespaces.
Installation
composer require kabiroman/adaptive-entity-manager-opentelemetry-bridge
Register the bundle in config/bundles.php and make sure an OTLP exporter/SDK is configured if you plan to export traces.
Configuration
Supported configuration structure (config/packages/adaptive_entity_manager_opentelemetry_bridge.yaml):
adaptive_entity_manager_opentelemetry_bridge: enabled: true manager_namespaces: sales: 'App\Domain\Sales\' legacy: 'App\Domain\Legacy\'
enabledtoggles tracing on or off.manager_namespacesmaps manager names (keys) to namespace prefixes (values), which are used to determine entity ownership.
Usage
EntityPersistenceTracingSubscriber listens to lifecycle events emitted by AdaptiveEntityManager. Thanks to autoconfiguration, it receives TracerInterface, LoggerInterface (if available), the enabled flag, and namespace mapping from the bundle configuration.
Span naming
Spans are named according to the following pattern:
aem.{operation}.{EntityShortName}
Examples:
aem.persist.Useraem.update.Orderaem.remove.Product
Span attributes
aem.operation:persist,update, orremoveaem.entity.class: fully qualified class nameaem.entity.short_class: short class nameaem.entity.id: result ofgetId()(when available)aem.manager: manager name resolved from namespace orunknownaem.entity.changed_fieldsandaem.entity.changed_fields_countfor updatescomponent:adaptive-entity-manager
Events
aem.entity.persisted— emitted after entity persistaem.entity.updated— emitted after entity updateaem.entity.removed— emitted after entity removal
Troubleshooting
Spans do not appear in Jaeger/Tempo
- Confirm that
TracerInterfaceis registered:php bin/console debug:container TracerInterface
- Make sure the subscriber and bundle are loaded:
php bin/console debug:container EntityPersistenceTracingSubscriber
- Check the configuration that Symfony loads:
php bin/console debug:config adaptive_entity_manager_opentelemetry_bridge
- Enable debug logging if needed:
monolog: handlers: main: level: debug
aem.manager always reads unknown
Ensure the configured namespaces match your entity namespaces:
manager_namespaces: sales: 'App\Domain\Sales\' # Must match the entity namespace prefix
App\Domain\Sales\Entity\User✅App\Entity\Sales\User❌ (namespace differs)
Jaeger / Tempo / OTLP
The bundle relies on OpenTelemetry\API\Trace\TracerInterface, so actual exporting and exporter selection happens outside the bundle (for example, with OpenTelemetry\SDK and an OTLP exporter). Ensure a TracerInterface service is available in your application.
Graceful degradation
- If no
TracerInterfaceis registered, spans are not created. - When
enabledisfalse, the subscriber is a no-op. - If
manager_namespacesis empty, the manager name defaults tounknown. - The logger is optional and only used for debug output.
Examples
Minimal configuration example:
adaptive_entity_manager_opentelemetry_bridge: enabled: '%env(bool:OTEL_ENABLED)%' manager_namespaces: sales: 'App\Domain\Sales\'
When Jaeger/Tempo receives traces, look for spans such as aem.persist.User and aem.update.Order that include manager, entity class, and id attributes.
Roadmap
This package is actively maintained. See ROADMAP.md for planned features and future releases.
Upcoming:
- v1.1.0 (Q1 2026): Span customization hooks, behavior tests, and edge case coverage
- v1.2.0 (Q2 2026): Integration tests, performance benchmarks, and CI/CD
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
MIT License - see LICENSE file for details.
kabiroman/adaptive-entity-manager-opentelemetry-bridge 适用场景与选型建议
kabiroman/adaptive-entity-manager-opentelemetry-bridge 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「manager」 「bundle」 「entity」 「opentelemetry」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kabiroman/adaptive-entity-manager-opentelemetry-bridge 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kabiroman/adaptive-entity-manager-opentelemetry-bridge 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kabiroman/adaptive-entity-manager-opentelemetry-bridge 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
Bundle Symfony DaplosBundle
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-17