-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.4.1 missing PDO construct span #1455
Comments
Hi @TomKeur when I run the test suite on 8.4.1, the tests pass - including this one test_pdo_construct I also spun if this little test and ran it via the built-in webserver:
<?php
putenv('OTEL_PHP_AUTOLOAD_ENABLED=true');
putenv('OTEL_TRACES_EXPORTER=console');
putenv('OTEL_METRICS_EXPORTER=none');
putenv('OTEL_LOGS_EXPORTER=none');
require_once __DIR__ . '/../vendor/autoload.php';
$pdo = new PDO('sqlite::memory:'); $ php -v
PHP 8.4.1 (cli) (built: Nov 21 2024 17:58:21) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Zend OPcache v8.4.1, Copyright (c), by Zend Technologies
with Xdebug v3.4.0, Copyright (c) 2002-2024, by Derick Rethans
$ php -S localhost:8000 examples/pdo_construct.php Hitting port 8000 with curl requests, and I see:
So, there's nothing fundamentally broken about the constructor with 8.4.1 I think the next step would be to switch to console exporter so you can see the spans that PHP emits. That should tell us if the problem is upstream (us) or downstream (something further down the line is discarding this span). |
Hi @brettmc Thank you for your response! But when I'm overwriting my
I'm seeing the construct Special thanks for: |
Hi!
When running open-telemetry/opentelemetry-auto-pdo
on PHP 8.4.1 I'm not getting a construct span for PDO, because I'm not seeing this span my observability tool is
missing the database service at all, i've tried different o11y tools, but they are all not working.
The spans debug are generated by Grafana Alloy (http page
otelcol.receiver.otlp.default
-> live debugging), but withthe OTel collector I'm having the same results.
Describe your environment
./bin/console about
:Debug is disabled on my
php
on CLI, but it's enabled as plugin (it's the same for both PHP versions)The traces are generated with a simple HTTP request (not CLI, so xdebug is enabled)
PHP 8.3.14
First span:
When running PHP 8.4.1:
First span:
Steps to reproduce
Doing a HTTP request to a PHP application on PHP 8.4.1 with OTel, it's gives a different first span.
What is the expected behavior?
Seeing the
PDO::__construct
as a first span.What is the actual behavior?
Getting a different first span,
PDO::exec
instead ofPDO::__construct
.This is causing the database service to be missing in the observability tool.
Additional context
If you need additional information, please contact me :).
The text was updated successfully, but these errors were encountered: