open-telemetry/opentelemetry-propagation-instana
Composer 安装命令:
composer require open-telemetry/opentelemetry-propagation-instana
包简介
OpenTelemetry Instana propagator.
README 文档
README
This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
OpenTelemetry Instana Propagator
The OpenTelemetry Propagator for Instana provides HTTP header propagation and Baggage propagation for systems that are using IBM Observability by Instana.
This propagator translates the Instana trace correlation headers (X-INSTANA-T/X-INSTANA-S/X-INSTANA-L) into the OpenTelemetry SpanContext, and vice versa.
It does not handle TraceState.
Installation
composer require open-telemetry/opentelemetry-propagation-instana
Usage
$propagator = InstanaPropagator::getInstance();
Both of the above have extract and inject methods available to extract and inject respectively into the header.
For Baggage propagation, use opentelemetry's MultiTextMapPropagator, and pass the array list of propagators i.e Instana and Baggage propagator as below.
$propagator = new MultiTextMapPropagator([InstanaPropagator::getInstance(), BaggagePropagator::getInstance()]);
Propagator Details
There are three headers that the propagator handles: X-INSTANA-T (the trace ID), X-INSTANA-S (the parent span ID), and X-INSTANA-L (the sampling level).
Example header triplet:
X-INSTANA-T: 80f198ee56343ba864fe8b2a57d3eff7,X-INSTANA-S: e457b5a2e4d86bd1,X-INSTANA-L: 1.
A short summary for each of the headers is provided below. More details are available at https://www.ibm.com/docs/en/obi/current?topic=monitoring-traces#tracing-headers.
X-INSTANA-T -- trace ID
- A string of either 16 or 32 characters from the alphabet
0-9a-f, representing either a 64 bit or 128 bit ID. - This header corresponds to the OpenTelemetry TraceId.
- If the propagator receives an X-INSTANA-T header value that is shorter than 32 characters when extracting headers into the OpenTelemetry span context, it will left-pad the string with the character "0" to length 32.
- No length transformation is applied when injecting the span context into headers.
X-INSTANA-S -- parent span ID
- Format: A string of 16 characters from the alphabet
0-9a-f, representing a 64 bit ID. - This header corresponds to the OpenTelemetry SpanId.
X-INSTANA-L - sampling level
- The only two valid values are
1and0. - A level of
1means that this request is to be sampled, a level of0means that the request should not be sampled. - This header corresponds to the sampling bit of the OpenTelemetry TraceFlags.
Useful links
- For more information on Instana, visit https://www.instana.com/ and Instana' documentation.
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
Installing dependencies and executing tests
From Instana subdirectory:
$ composer install $ ./vendor/bin/phpunit tests
open-telemetry/opentelemetry-propagation-instana 适用场景与选型建议
open-telemetry/opentelemetry-propagation-instana 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 151.38k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 05 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「opentelemetry」 「open-telemetry」 「otel」 「propagator」 「instana」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 open-telemetry/opentelemetry-propagation-instana 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 open-telemetry/opentelemetry-propagation-instana 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 open-telemetry/opentelemetry-propagation-instana 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
OpenTelemetry auto-instrumentation for PHP Session functions
OpenTelemetry PServiceBus auto-instrumentation
OpenTelemetry SDK rule-based sampler
The Azure package for opentelemetry-php
OpenTelemetry auto-instrumentation for Laravel
CloudTraceContext propagator extension for OpenTelemetry PHP.
统计信息
- 总下载量: 151.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-05-20