-
Notifications
You must be signed in to change notification settings - Fork 152
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
[Bug]: _generated_tracer.php crashes with php-amqplib integration enabled #2172
Comments
Hi Tobias, For now, it is not obvious to me what the problem is, and I will keep searching... However, would it be possible for you to change the manual instrumentation you are doing in your Thanks |
Just a quick update on this @CatoTH, I've been trying to reproduce the issue from the information I can get from the stack trace (i.e., a symfony app with |
So there is one spot that is somewhat curious here. In app/console, we are overwriting the resource name to include the RabbitMQ queue name. That's most likely not the most elegant way to solve that.
I assume, here, As for DatadogProcessor.php, it's
I can try if using |
Thanks for these snippets! You are absolutely right. Replacing Similarly/If needed, you may try replacing with the following in your app/console: $span = \DDTrace\active_span();
if ($span) {
$commandName = $input->getFirstArgument();
if ($commandName === 'rabbitmq:consumer' && isset($_SERVER['argv'][2])) {
$commandName .= '#' . $_SERVER['argv'][2];
}
$span->meta['command_name'] = $commandName;
$span->resource = $commandName;
} |
So at first glance / a first test, it indeed looks like using the new calls the problem does not appear anymore. |
Hi, |
Bug report
We tried upgrading dd-trace-php and the PHP extension from an older version (0.79.0) to one of the more recent versions (we tried 0.88.1, 0.89.0 and 0.90.0). After this update, our php-amqplib rabbitmq-workers are crashing once a message actually comes in. We are getting the following stacktrace:
(That particular stacktrace was done with 0.89.0, but the same happened with a version earlier and later).
The exception does not happen anymore if we set the environment variable
DD_TRACE_AMQP_ENABLED=0
, hence we guess the new php-amqplib integration might be triggering this behaviour.PHP version
7.4.28
Tracer or profiler version
0.90.0
Installed extensions
[PHP Modules]
apcu
bcmath
Core
ctype
curl
datadog-profiling
date
ddappsec
ddtrace
dom
fileinfo
filter
ftp
gd
hash
iconv
igbinary
intl
json
libxml
mbstring
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sockets
sodium
SPL
sqlite3
standard
timezonedb
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
datadog-profiling
ddappsec
ddtrace
Output of
phpinfo()
{ "date": "2023-07-19T12:49:40Z", "os_name": "Linux staging-stg1-######.x86_64 #1 SMP Wed Mar 15 00:26:42 UTC 2023 x86_64", "os_version": "######.x86_64", "version": "0.90.0", "lang": "php", "lang_version": "7.4.33", "env": "stg", "enabled": true, "service": "######", "enabled_cli": true, "agent_url": "http://######", "debug": false, "analytics_enabled": false, "sample_rate": 1, "sampling_rules": [ { "sample_rate": 0.01 } ], "tags": [], "service_mapping": { "pdo": "######", "redis": "######" }, "distributed_tracing_enabled": true, "priority_sampling_enabled": true, "dd_version": "53e1c410101951e39d822fcd4e04718307a5bc78", "architecture": "x86_64", "sapi": "fpm-fcgi", "datadog.trace.request_init_hook": "/opt/datadog/dd-library/0.90.0/dd-trace-sources/bridge/dd_wrap_autoloader.php", "open_basedir_configured": false, "uri_fragment_regex": null, "uri_mapping_incoming": null, "uri_mapping_outgoing": null, "auto_flush_enabled": false, "generate_root_span": true, "http_client_split_by_domain": true, "measure_compile_time": true, "report_hostname_on_root_span": false, "traced_internal_functions": null, "auto_prepend_file_configured": false, "integrations_disabled": "default", "enabled_from_env": true, "opcache.file_cache": null }
Upgrading from
0.79.0
The text was updated successfully, but these errors were encountered: