Skip to content

Conversation

jerrytfleung
Copy link

@jerrytfleung jerrytfleung commented Sep 11, 2025

Changes

  • Applied Globals::responsePropagator() API in each HTTP instrumentation library
  • Registered response propagators (servertiming, traceresponse) to the Registry
  • Bumped API, SDK, Context version for each HTTP instrumentation library and Response Propagators in order to use the experimental response propagator API
  • Fixed the GHA issue (e.g. style issue from Symfony, semconv issue from MongDB) so that all GHA(s) are passing.

Test result with Slim instrumentation
Command

env OTEL_PHP_AUTOLOAD_ENABLED=true OTEL_TRACES_EXPORTER=console OTEL_METRICS_EXPORTER=console OTEL_LOGS_EXPORTER=console OTEL_LOG_LEVEL=info OTEL_SERVICE_NAME=test OTEL_EXPERIMENTAL_RESPONSE_PROPAGATORS=servertiming,traceresponse php -S localhost:8080
$ curl -v http://localhost:8080
* Host localhost:8080 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:8080...
* connect to ::1 port 8080 from ::1 port 58936 failed: Connection refused
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/8.5.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Host: localhost:8080
< Date: Thu, 11 Sep 2025 23:28:27 GMT
< Connection: close
< X-Powered-By: PHP/8.3.6
< server-timing: traceparent;desc=00-73dbf0f78c24b08faf273fee7ae5d77b-76c077b8629b08d1-01
< traceresponse: 00-73dbf0f78c24b08faf273fee7ae5d77b-76c077b8629b08d1-01
< Content-type: text/html; charset=UTF-8
< 
* Closing connection

Copy link

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.85%. Comparing base (cfc1674) to head (552b68c).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...gation/ServerTiming/src/ServerTimingPropagator.php 75.00% 1 Missing ⚠️
...tion/TraceResponse/src/TraceResponsePropagator.php 75.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #436      +/-   ##
============================================
+ Coverage     82.53%   82.85%   +0.31%     
- Complexity     1983     2353     +370     
============================================
  Files           137      164      +27     
  Lines          8084     9563    +1479     
============================================
+ Hits           6672     7923    +1251     
- Misses         1412     1640     +228     
Flag Coverage Δ
Aws 93.41% <ø> (ø)
Context/Swoole 0.00% <ø> (ø)
Exporter/Instana 49.42% <ø> (ø)
Instrumentation/AwsSdk 81.13% <ø> (ø)
Instrumentation/CakePHP 20.40% <ø> (ø)
Instrumentation/CodeIgniter 78.99% <100.00%> (+5.00%) ⬆️
Instrumentation/Curl 87.66% <ø> (ø)
Instrumentation/Doctrine 92.92% <ø> (ø)
Instrumentation/ExtAmqp 88.48% <ø> (ø)
Instrumentation/ExtRdKafka 86.11% <ø> (ø)
Instrumentation/Guzzle 75.58% <ø> (ø)
Instrumentation/HttpAsyncClient 78.04% <ø> (ø)
Instrumentation/IO 0.00% <ø> (-70.69%) ⬇️
Instrumentation/Laravel 71.66% <100.00%> (+0.68%) ⬆️
Instrumentation/MongoDB 74.28% <100.00%> (?)
Instrumentation/MySqli 95.81% <ø> (ø)
Instrumentation/OpenAIPHP 87.21% <ø> (ø)
Instrumentation/PDO 94.21% <ø> (ø)
Instrumentation/PostgreSql 93.54% <ø> (ø)
Instrumentation/Psr14 76.47% <ø> (ø)
Instrumentation/Psr15 89.15% <ø> (ø)
Instrumentation/Psr16 97.50% <ø> (ø)
Instrumentation/Psr18 77.46% <ø> (ø)
Instrumentation/Psr3 67.01% <ø> (ø)
Instrumentation/Psr6 97.61% <ø> (ø)
Instrumentation/ReactPHP 99.45% <ø> (ø)
Instrumentation/Session 94.52% <ø> (ø)
Instrumentation/Slim 84.28% <100.00%> (-1.83%) ⬇️
Instrumentation/Symfony 84.03% <100.00%> (-0.85%) ⬇️
Instrumentation/Yii 83.05% <100.00%> (+5.18%) ⬆️
Logs/Monolog 100.00% <ø> (ø)
Propagation/CloudTrace 89.77% <ø> (ø)
Propagation/Instana 98.11% <ø> (ø)
Propagation/ServerTiming 94.73% <75.00%> (-5.27%) ⬇️
Propagation/TraceResponse 94.73% <75.00%> (-5.27%) ⬇️
ResourceDetectors/Azure 91.66% <ø> (ø)
ResourceDetectors/Container 93.02% <ø> (ø)
ResourceDetectors/DigitalOcean 100.00% <ø> (ø)
Sampler/RuleBased 33.51% <ø> (ø)
Sampler/Xray 78.23% <ø> (ø)
Shims/OpenTracing 92.45% <ø> (ø)
Symfony 87.81% <ø> (?)
Utils/Test 87.53% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ion/CodeIgniter/src/CodeIgniterInstrumentation.php 81.90% <100.00%> (+3.00%) ⬆️
...vel/src/Hooks/Illuminate/Contracts/Http/Kernel.php 89.85% <100.00%> (+4.92%) ⬆️
...n/MongoDB/src/MongoDBInstrumentationSubscriber.php 78.65% <100.00%> (ø)
...c/Instrumentation/Slim/src/SlimInstrumentation.php 85.29% <100.00%> (-0.56%) ⬇️
...rumentation/Symfony/src/SymfonyInstrumentation.php 79.43% <100.00%> (-0.75%) ⬇️
src/Instrumentation/Yii/src/YiiInstrumentation.php 87.12% <100.00%> (+3.31%) ⬆️
.../OtelSdkBundle/Util/ServicesConfiguratorHelper.php 100.00% <ø> (ø)
...gation/ServerTiming/src/ServerTimingPropagator.php 94.73% <75.00%> (-5.27%) ⬇️
...tion/TraceResponse/src/TraceResponsePropagator.php 94.73% <75.00%> (-5.27%) ⬇️

... and 31 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfc1674...552b68c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jerrytfleung
Copy link
Author

GHA is failing due to the assumption that open-telemetry/opentelemetry-php#1712 is in the main branch.

@jerrytfleung
Copy link
Author

GHA is failing due to the assumption that open-telemetry/opentelemetry-php#1712 is in the main branch.

As open-telemetry/opentelemetry-php#1712 is merged, all the GHA(s) are passing now.

@jerrytfleung
Copy link
Author

jerrytfleung commented Sep 19, 2025

@open-telemetry/php-maintainers Please take a look. This PR is to apply the newly added experimental response propagator API to contrib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant