Datadog Tracing PHP Client

Overview

DD Trace PHP

CircleCI OpenTracing Badge Minimum PHP Version License Packagist Version Total Downloads

PHP Tracer

Getting Started

The Datadog PHP Tracer (ddtrace) brings APM and distributed tracing to PHP.

Installing the extension

Visit the PHP tracer documentation for complete installation instructions.

Advanced configuration

For more information about configuring and instrumenting ddtrace, view the configuration documentation.

OpenTracing

The ddtrace package provides an OpenTracing-compatible tracer.

Contributing

Before contributing to this open source project, read our CONTRIBUTING.md.

Security Vulnerabilities

If you have found a security issue, please contact the security team directly at [email protected].

Comments
  • [BUG] Constant HTTP 500 with preloading enabled on version 0.48.3

    [BUG] Constant HTTP 500 with preloading enabled on version 0.48.3

    Bug description

    We're seeing obscure but constant HTTP 500 with PHP preloading enabled and Datadog extension loaded. Once the extension is removed (rm /etc/php/7.4/fpm/conf.d/98-ddtrace.ini /etc/php/7.4/fpm/conf.d/99-ddtrace-custom.ini) everything works fine.

    PHP version

    7.4.11 NTS

    Installed extensions

    [PHP Modules]
    amqp
    bcmath
    blackfire
    calendar
    Core
    ctype
    curl
    date
    ddtrace
    dom
    exif
    FFI
    fileinfo
    filter
    ftp
    gettext
    hash
    iconv
    igbinary
    imap
    intl
    json
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    Phar
    posix
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    sockets
    sodium
    SPL
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    xml
    xmlreader
    xmlwriter
    xsl
    Zend OPcache
    zlib
    
    [Zend Modules]
    Zend OPcache
    blackfire
    ddtrace
    

    OS info

    Debian slim (Docker)

    Diagnostics and configuration

    Output of phpinfo() (ddtrace >= 0.47.0)

    Output from php -i (same configuration as FPM):

    ddtrace
    
    Datadog PHP tracer extension
    For help, check out the documentation at https://docs.datadoghq.com/tracing/languages/php/
    (c) Datadog 2020
    
    Datadog tracing support => enabled
    Version => 0.48.3
    DATADOG TRACER CONFIGURATION => {"date":"2020-10-08T21:11:35Z","os_name":"Linux 1fccd4138f01 5.9.0-rc6-amd64 #1 SMP Debian 5.9~rc6-1~exp1 (2020-09-21) x86_64","os_version":"5.9.0-rc6-amd64","version":"0.48.3","lang":"php","lang_version":"7.4.2","env":null,"enabled":true,"
    service":null,"enabled_cli":false,"agent_url":"http://localhost:8126","debug":false,"analytics_enabled":false,"sample_rate":1.000000,"sampling_rules":null,"tags":null,"service_mapping":null,"distributed_tracing_enabled":true,"priority_sampling_enabled":true,"dd_version":n
    ull,"architecture":"x86_64","sapi":"cli","ddtrace.request_init_hook":"/opt/datadog-php/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":fa
    lse,"generate_root_span":true,"http_client_split_by_domain":false,"measure_compile_time":true,"report_hostname_on_root_span":false,"traced_internal_functions":null,"auto_prepend_file_configured":false,"integrations_disabled":null,"enabled_from_env":true,"opcache.file_cach
    e":"/app/tracking/var/opcache","agent_error":"Failed to connect to localhost port 8126: Connection refused","opcache_file_cache_set":"The opcache.file_cache INI setting is set. This setting can cause unexpected behavior with the PHP tracer due to a bug in OPcache: https:/
    /bugs.php.net/bug.php?id=79825"}
    
                                   Diagnostics                               
    agent_error => Failed to connect to localhost port 8126: Connection refused
    opcache_file_cache_set => The opcache.file_cache INI setting is set. This setting can cause unexpected behavior with the PHP tracer due to a bug in OPcache: https://bugs.php.net/bug.php?id=79825
    Diagnostic checks => failed
    
    Directive => Local Value => Master Value
    ddtrace.disable => Off => Off
    ddtrace.request_init_hook => /opt/datadog-php/dd-trace-sources/bridge/dd_wrap_autoloader.php => /opt/datadog-php/dd-trace-sources/bridge/dd_wrap_autoloader.php
    
    πŸ› bug c-extension sev-1 cat:app-crash 
    opened by Majkl578 30
  • [Feature] Support arm architecture

    [Feature] Support arm architecture

    Is your feature request related to a problem? Please describe.

    I want to be able to build my Docker images which depend on Datadog PHP extension on my m1 Mac laptop as well as AWS Graviton CPUs (using Ubuntu image)

    Describe the solution you'd like

    A published deb file for arm architecture I can install

    Describe alternatives you've considered

    N/A

    Additional context

    N/A

    feature-request cat:platform 
    opened by jippi 27
  • [Feature] add a .apk for arm64 to the release section

    [Feature] add a .apk for arm64 to the release section

    Is your feature request related to a problem? Please describe. We are using dd-trace-php with AWS ECS starting a1 type instances (arm64). Our php app is a dockerized FROM php:7.1-fpm-alpine No .apk is available for arm64 architecture.

    Describe the solution you'd like We'd like to install the extension using an .apk as indicated by the documentation using: apk add datadog-php-tracer.apk --allow-untrusted For exemple we expect to have the file datadog-php-tracer_0.54.0_arm64.apk as an additional asset is the github release section for version 0.54.0

    feature-request cat:installation 
    opened by philippefuentes 26
  • [Feature] Enable distributed tracing with dd_trace_method and dd_trace_function

    [Feature] Enable distributed tracing with dd_trace_method and dd_trace_function

    Is your feature request related to a problem? Please describe. In order to enable distributed tracing for example for grpc requests, in dd_trace_method or dd_trace_function, we need to be able to set and extract the trace id and parent id which are sent and received via headers.

    Describe the solution you'd like In dd_trace_method something like this should be possible:

    When receiving a request:

    $span->trace_id = $tracingHeaders[Propagator::DEFAULT_TRACE_ID_HEADER];
    $span->parent_id = $tracingHeaders[Propagator::DEFAULT_PARENT_ID_HEADER];
    

    When sending a request:

    $tracingHeaders[Propagator::DEFAULT_TRACE_ID_HEADER] = $span->trace_id;
    $tracingHeaders[Propagator::DEFAULT_PARENT_ID_HEADER] = $span->parent_id;
    

    Describe alternatives you've considered In general, I think it would be helpful, if the created internal span from dd_trace_method is configurable like in dd_trace

    feature-request cat:manual-instrumentation 
    opened by Bibob7 26
  • [BUG] Error: Call to undefined function () in /opt/datadog-php/dd-trace-sources/bridge/functions.php:138

    [BUG] Error: Call to undefined function () in /opt/datadog-php/dd-trace-sources/bridge/functions.php:138

    Describe the bug When running this plugin on PHP 7.4.5 we often get the following error. Out setup runs on AWS Fargate:

    PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function () in /opt/datadog-php/dd-trace-sources/bridge/functions.php:138
    thrown in /opt/datadog-php/dd-trace-sources/bridge/functions.php on line 138
    #0 /app/vendor/composer/autoload_real.php(25): ComposerAutoloaderInit26ebf97ffdb7575dcfd32f97a9330f1b::dd_trace_callback(Array, true, true)
    #1 /app/vendor/autoload.php(7): ComposerAutoloaderInit26ebf97ffdb7575dcfd32f97a9330f1b::getLoader()
    #2 /app/public_html/index.php(2): require('/app/vendor/aut...')
    

    This causes the docker container to crash and restart.

    We are not seeing this behavior on 7.4.4.

    PHP Info

    • Output of php -v

    PHP 7.4.5 (cli) (built: Apr 24 2020 17:44:59) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies

    • Output of php -m

    [PHP Modules] apcu bcmath bz2 calendar Core ctype curl date ddtrace dom exif fileinfo filter ftp gd geoip gmp hash iconv intl json libxml mbstring memcached mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix readline Reflection session SimpleXML soap sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter Zend OPcache zip zlib

    [Zend Modules] Zend OPcache

    OS Info

    • Output of cat /etc/os-release | grep -E "(NAME)|(VERSION)"

    NAME="Alpine Linux" VERSION_ID=3.11.6 PRETTY_NAME="Alpine Linux v3.11"

    Output of dd-doctor

    DataDog trace extension verification

    • PHP version and SAPI [7.4.5 - fpm-fcgi]
    • ddtrace extension installed [OK]
    • ddtrace version (installed) [0.41.1]
    • ddtrace version (const) [0.41.1]
    • ddtrace version (userland) [0.41.1]
    • ddtrace versions in sync [OK]
    • dd_trace() function available [OK]
    • dd_trace_env_config() function available [OK]
    • ddtrace.request_init_hook set [OK]
    • ddtrace.request_init_hook reachable [OK]
    • ddtrace.request_init_hook has run [OK]
    • 'open_basedir' allows access to '/proc/self/' [OK]
    • IntegrationsLoader exists [OK]
    • Integrations not loaded yet [OK]
    • Registering an autoloader...
    • Integrations loaded [OK]
    • DDTrace\Tracer class exists [OK]
    • Background sender is enabled? [NO]

      You can enable the background sender via DD_TRACE_BETA_SEND_TRACES_VIA_THREAD=true

    • Configured Agent host [localhost]
    • Configured Agent port [8126]
    • Agent can receive traces [FAIL] Curl verbose output:
    • Trying 127.0.0.1:8126...
    • TCP_NODELAY set
    • connect to 127.0.0.1 port 8126 failed: Connection refused
    • Trying ::1:8126...
    • TCP_NODELAY set
    • Immediate connect fail for ::1: Address not available
    • Trying ::1:8126...
    • TCP_NODELAY set
    • Immediate connect fail for ::1: Address not available
    • Failed to connect to localhost port 8126: Connection refused
    • Closing connection 0
    πŸ› bug 
    opened by ThomasVdBerge 23
  • [BUG] Potential incompatibility with ionCube Extension

    [BUG] Potential incompatibility with ionCube Extension

    Bug description

    We are using the Unirgy Rapidflow module within a Magento 2 instance. This module is partially ionCube encoded. We've found that if the ddtrace extension is enabled, this module can cause segmentation faults in PHP when performing some operations. Disabling the ddtrace extension or setting ddtrace.enable to Off in PHP INI resolves the issues with the Rapidflow module.

    The initiation of this modules functionality is done through a web request which is handled by Apache and passed via mod_proxy_fcgi to PHP-FPM. Testing was done using a Docker container running locally on my development machine. We run similar setups in our production environment which is experiencing the exact same issue.

    More than willing to do debugging on my end given a bit of direction on what would be the most helpful. Given this is a local environment with a custom container image, I can install whatever tools necessary without any constraints.

    Note that we were aware of existing incompatibility with ionCube prior to version 0.71.0. We used the SourceGuardian extension with a SourceGuardian encoded version of this module to work around that problem. This worked until a recent update to the module where we started seeing segmentation faults. At that time, we updated to ddtrace 0.71.0 and the ionCube encoded version of the module along with the latest ionCube loader 11.0.1. This seemed to be fully working, but we started to find these segmentation faults while running some profiles even though other similar profiles are working without issue.

    Also note that because this is a local instance, I do not have the agent setup. This does not impact the ability to reproduce this issue so I did not take the time to get that setup.

    PHP version

    PHP 7.4.28 (cli) (built: Mar 29 2022 03:39:25) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with the ionCube PHP Loader + ionCube24 v11.0.1, Copyright (c) 2002-2022, by ionCube Ltd. with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies with Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans with ddtrace v0.72.0, Copyright Datadog, by Datadog

    Tracer version

    0.71.0, 0.72.0

    Installed extensions

    [PHP Modules] amqp apcu bcmath bz2 calendar Core ctype curl date ddtrace dom exif fileinfo filter ftp gd geoip gettext hash iconv imagick imap intl ionCube Loader json ldap libxml mbstring memcached mongodb mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_pgsql pdo_sqlite pgsql Phar posix readline redis Reflection session shmop SimpleXML soap sockets sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer vips xdebug xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib

    [Zend Modules] Xdebug Zend OPcache ddtrace the ionCube PHP Loader + ionCube24

    OS info

    PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster

    Diagnostics and configuration

    Output of phpinfo() (ddtrace >= 0.47.0)

    PHP-7-4-28-phpinfo-

    πŸ› bug question cat:incompatibility 
    opened by nhughart 22
  • [BUG] Increased memory usage/leak after upgrading from 0.64.1 to 0.67.0+

    [BUG] Increased memory usage/leak after upgrading from 0.64.1 to 0.67.0+

    Bug description

    We are seeing memory usage typical for memory leaks on one of our apps with PHP 8.1 running and DDTrace versions 0.67.0, 0.68.2, 0.69.0 (we were not able to test 0.70+ due to reported issue https://github.com/DataDog/dd-trace-php/issues/1544) after upgrading from DDTrace 0.64.1 on long-running processes (mainly queue consumers).

    In order to investigate further what is happening, we updated a second application (running PHP 8.0) also from DDTrace 0.64.1 to 0.69.0 and we can see non-negligible memory usage increase although I cannot say for sure it's a memory leak or just an increase in memory footprint since we're scaling the application a lot and therefore lifetime of a container is in matter of minutes, not hours.

    I've seen that DDTrace started to use WeakRef/WeakMap on PHP 8.0+. I'm not sure if it's somehow related but we encountered issues with WeakRef that is reported and verified here: https://bugs.php.net/bug.php?id=81027.

    We're also heavily using Guzzle in many of the consumers that now fail on memory.

    I'd love to provide more information but I'm not sure how to debug ddtrace memory usage properly, especially when it exhibits only in long-running processes (I may try Blackfire but it's not easy to replicate the "traffic" locally).

    I'm also not entirely sure it's DDTrace fault but as I said nothing had been changed on the second application except for DDTrace version and increased memory usage is clearly visible.

    I'd appreciate any insight into what MIGHT have changed, any debugging tips and if an increased memory usage is expected or not.

    Thank you!

    Screenshot 2022-03-18 at 11 46 43 (1) (First application, showing average memory usage) Screenshot 2022-03-21 at 16 05 33 (Second application, nothing had been changed here except for DDTrace version, showing average memory usage, aggregated from multiple containers)

    increased memory usage on our application running

    PHP version

    PHP 8.1.4 (cli) (built: Mar 20 2022 16:51:10) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.1.4, Copyright (c) Zend Technologies
        with Zend OPcache v8.1.4, Copyright (c), by Zend Technologies
        with blackfire v1.75.0~linux-x64-non_zts81, https://blackfire.io, by Blackfire
        with ddtrace v0.71.0, Copyright Datadog, by Datadog
    

    Tracer version

    0.69.0

    Installed extensions

    [PHP Modules]
    bcmath
    blackfire
    calendar
    Core
    ctype
    curl
    date
    ddtrace
    dom
    exif
    FFI
    fileinfo
    filter
    ftp
    gettext
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    Phar
    posix
    readline
    Reflection
    session
    shmop
    SimpleXML
    soap
    sockets
    sodium
    SPL
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    xml
    xmlreader
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    blackfire
    ddtrace
    

    OS info

    PRETTY_NAME="Debian GNU/Linux 10 (buster)"
    NAME="Debian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    

    Diagnostics and configuration

    Output of phpinfo() (ddtrace >= 0.47.0)

    {"date":"2022-03-21T14:27:48Z","os_name":"Linux f2f9e7dc8456 5.10.104-linuxkit #1 SMP Wed Mar 9 19:05:23 UTC 2022 x86_64","os_version":"5.10.104-linuxkit","version":"0.71.0","lang":"php","lang_version":"8.1.4","env":"olsavmic","enabled":true,"service":"testing-71","enabled_cli":true,"agent_url":"http:\/\/datadog:8126","debug":true,"analytics_enabled":false,"sample_rate":1,"sampling_rules":[],"tags":[],"service_mapping":[],"distributed_tracing_enabled":true,"priority_sampling_enabled":true,"dd_version":null,"architecture":"x86_64","sapi":"fpm-fcgi","datadog.trace.request_init_hook":"\/opt\/datadog-php\/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":false,"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}
    

    Diagnostic checks | passed

    Upgrading info

    Upgraded from DDTrace 0.64.1 -> 0.67.0, 0.68.2, 0.69.0, all versions are showing the same behaviour.

    πŸ› bug sev-1 cat:performance 
    opened by olsavmic 21
  • PHP-FPM SIGSEGV(s) with installed package datadog-php-tracer-0.34.0-1.x86_64

    PHP-FPM SIGSEGV(s) with installed package datadog-php-tracer-0.34.0-1.x86_64

    We started testing this on a centos7 machine running php7.0.33 php-fpm and nginx. We're getting intermittent (20%) SIGSEGV(s) at random time intervals (request based, not time based) on certain requests.

    Uninstalling this package causes the application to run fine. Please let me know if I can provide more info or the problem is fixed.

    πŸ› bug 
    opened by recarv 21
  • Installing on Alpine 3.5 fails to enable extension

    Installing on Alpine 3.5 fails to enable extension

    To reproduce run docker build with the following Dockerfile:

    FROM alpine:3.5
    
    RUN apk --no-cache add \
            bash curl php5 libc6-compat \
            && ln -s /etc/php5 /etc/php
    
    ENV DDTRACE_VERSION=0.16.1
    
    RUN cd $(mktemp -d) \
        && curl -Lo datadog-php-tracer.apk https://github.com/DataDog/dd-trace-php/releases/download/${DDTRACE_VERSION}/datadog-php-tracer_${DDTRACE_VERSION}_noarch.apk \
        && apk add datadog-php-tracer.apk --allow-untrusted \
        && rm datadog-php-tracer.apk
    

    Error:

    PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/datadog-php/extensions/ddtrace-20131106.so' - Error relocating /opt/datadog-php/extensions/ddtrace-20131106.so: backtrace: symbol not found in Unknown on line 0
    
    πŸ› bug c-extension cat:installation 
    opened by carflo 21
  • CURL headers are overwritten in v0.15.1

    CURL headers are overwritten in v0.15.1

    Hola. Wanted to report this bug which blocks us actually. Using php 7.1

    When I make curl request, datadog seems to intercept headers and rewrite them to its own In our case its host that is important

    Screen Shot 2019-03-15 at 15 32 41 πŸ› bug cat:new-integration 
    opened by tot-ra 21
  • [BUG] SIGSEGV after upgrading to v0.49.0 from v0.44.1

    [BUG] SIGSEGV after upgrading to v0.49.0 from v0.44.1

    Bug description

    I've started seeing this issue after the upgrade to 0.49.0. It occurs rarely and only in production.

    I'd be happy to provide core dump but, there's something wrong with my php-fpm config (probably), because it doesn't generate core dump when this issue occurs. BTW, if you know reliable steps to get php to segfault, please let me know :)

    At this point I'm looking for some guidance on what I can check to narrow down the potential causes.

    Thanks!

    PHP version

    PHP 7.4.11 (cli) (built: Oct 18 2020 19:44:48) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies
        with ddtrace v0.49.0, Copyright Datadog, by Datadog
    

    Installed extensions

    extensions

    [PHP Modules]                                                                                                                                                                                                                                  
    bcmath                                                                                                                                                                                                                                         
    calendar                                                                                                                                                                                                                                       
    Core                                                                                                                   
    ctype                                          
    curl                                                                                                                   
    date                                                                                                                                                                                                                                           
    ddtrace                                                    
    dom                                                                                                                                                                                                                                            
    exif                                                                                                                                                                                                                                           
    FFI                                                                                                                    
    fileinfo                                    
    filter                                                                                                                 
    ftp                                                                                                                    
    gd                                                   
    gettext                                                    
    gmp                                                                                                                    
    hash                                                                                                                                                                                                                                           
    iconv                                                                                                                                                                                                                                          
    igbinary                                                                                                               
    intl                                                                                                                                                                                                                                           
    json                                                                                                                   
    libxml                               
    mbstring                                                                                                               
    mysqli                                                     
    mysqlnd                                                  
    openssl                                                    
    pcntl                                                      
    pcre                                                                                                                   
    PDO                                                                                                                    
    pdo_mysql                                                                                                                                                                                                                                      
    Phar                                                                                                                                                                                                                                           
    posix                                                                                                                  
    rdkafka                                                                                                                
    readline                                                                                                               
    redis                                                                                                                  
    Reflection                                           
    session                                                                                                                
    shmop                                                                                                                  
    SimpleXML                                                                                                                                                                                                                                      
    sockets                                                    
    sodium                                                 
    SPL                                                                                                                                                                                                                                            
    ssh2                                                                                                                   
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    xdebug
    xml
    xmlreader
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    ddtrace
    

    OS info

    PRETTY_NAME="Debian GNU/Linux 10 (buster)"
    NAME="Debian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    

    Diagnostics and configuration

    Output of phpinfo() (ddtrace >= 0.47.0)

    image

    Upgrading info

    Previous version 0.44.1

    πŸ› bug sev-1 cat:app-crash 
    opened by gornostal 20
  • [Feature] php-amqplib Integration

    [Feature] php-amqplib Integration

    As a developer, I'd like to see information about RabbitMQ messages inside traces.

    Solution Support for the php-amqplib library, which is as far as I could research the most widely used RabbitMQ client for PHP.

    Alternatives I've considered Implementing custom instrumentation myself. I would prefer to have this out of the box though.

    Interesting methods Methods I personally am interested in:

    AMQPChannel

    • PhpAmqpLib\Channel\AMQPChannel::basic_publish()
    • PhpAmqpLib\Channel\AMQPChannel::basic_consume()
    • PhpAmqpLib\Channel\AMQPChannel::basic_get()
    • PhpAmqpLib\Channel\AMQPChannel::basic_ack()
    • PhpAmqpLib\Channel\AMQPChannel::basic_nack()
    • PhpAmqpLib\Channel\AMQPChannel::basic_cancel()

    Especially interesting parameters: Exchange, Queue, Routing Key

    AbstractConnection

    • PhpAmqpLib\Connection\AbstractConnection::connect()
    • PhpAmqpLib\Connection\AbstractConnection::reconnect()

    It might make sense to extend this list.

    feature-request 
    opened by orlandothoeny 1
  • [Tracer] Show error message when PDO returns an error

    [Tracer] Show error message when PDO returns an error

    Description

    Adds the error message in the error message tag when available. This gives more information on where the issue is. Error messages are contained inside the errorInfo array. The specs state it contains 3 elements but SQLServer seems to set more than that.

    This extra data shouldn't contain sensitive data as it should be close to what we get on PDOException when there is one.

    Readiness checklist

    • [ ] (only for Members) Changelog has been added to the release document.
    • [ ] Tests added for this feature/bug.

    Reviewer checklist

    • [ ] Appropriate labels assigned.
    • [ ] Milestone is set.
    • [ ] Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.
    πŸ† enhancement cat:integration 
    opened by pierotibou 1
  • Remove libexecinfo on Alpine

    Remove libexecinfo on Alpine

    Description

    Fix GH-1824. The quick summary is Alpine 3.17 removed this library, and on older versions it's apparently not great quality anyway.

    The biggest negative impact of this change is that when DD_TRACE_HEALTH_METRICS_ENABLED or DD_LOG_BACKTRACE or their INI equivalents are used, and a SIGSEGV occurs, that a backtrace will no longer be displayed. In other words, although this is a breaking change for Alpine platforms, the impact is quite small.

    On the other hand, it has one less runtime dependency; Alpine users will no longer need to apk add libexecinfo before installing the tracer.

    Readiness checklist

    • [x] Changelog has been added to the release document.
    • [x] Tests added for this feature/bug.

    Reviewer checklist

    • [x] Appropriate labels assigned.
    • [x] Milestone is set.
    πŸ’” breaking-change c-extension 
    opened by morrisonlevi 1
  • feat(tracing): add component tag

    feat(tracing): add component tag

    Description

    This PR introduces the component tag within the tracer for all supported integrations. The component tag is set to the name of the integration that produced the span and should be set on all integration-produced spans. Motivation for this change is to make Datadog APM tracer libraries tagging and span formatting more consistent.

    Readiness checklist

    • [ ] (only for Members) Changelog has been added to the release document.
    • [ ] Tests added for this feature/bug.

    Reviewer checklist

    • [ ] Appropriate labels assigned.
    • [ ] Milestone is set.
    • [ ] Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.
    opened by wconti27 1
  • Ini file created by datadog-setup.phpdoes not align with rpm package

    Ini file created by datadog-setup.phpdoes not align with rpm package

    Hey guys,

    we encountered several "PHP Warning: Module 'ddtrace' already loaded in Unknown on line 0" warnings after we used your installer over the last couple of weeks. We had DD as well as the profiler installed before we used your installer for the first time.

    The reason was a bit tough to find but logical at the end :-)

    https://github.com/DataDog/dd-trace-php/blob/7cdb199db6513d10eaaceb1ca3c5ae33465dae8c/datadog-setup.php#L227

    We install all DD packages using the remi repo rpm packages on Centos ( let's take a jump back to the past: https://github.com/DataDog/dd-trace-php/issues/214 ). Remi adds the ini files with the prefix 40-ddtrace.ini. Thus all updates to the rpm packages leads to a duplicate ini file being present. Your installer creates 98-ddtrace.ini.

    We now simply moved your ini file to 40-ddtrace.ini. But still running the installer again or setting up a fresh system will always lead to this ini clash.

    Maybe you could add a check to your installer to see if a xx-ddtrace.ini file is already present in /php.d/ and offer to overwrite these instead of creating a new file?

    Best regards,

    Jan

    cat:installation 
    opened by JanThiel 3
  • Use numbers instead of numeric strings in pprof labels (update libdatadog)

    Use numbers instead of numeric strings in pprof labels (update libdatadog)

    Description

    Use numbers instead of numeric strings in pprof labels. This is more efficient, and may open the doors to having a global string table in the future, which could be used to create a global symbol table as well.

    This pairs with Datadog/libdatadog#80. This is blocked from merging at the moment because:

    1. There's an issue with Code Hotspots.
    2. A specific git revision is hardcoded until the libdatadog PR merges.

    Readiness checklist

    • [ ] Changelog has been added to the release document.
    • [ ] Tests added for this feature/bug.

    Reviewer checklist

    • [ ] Appropriate labels assigned.
    • [ ] Milestone is set.
    • [ ] Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.
    profiling 
    opened by morrisonlevi 0
Releases(0.82.0)
PHP APM (Alternative PHP Monitor)

APM (Alternative PHP Monitor) APM (Alternative PHP Monitor) is a monitoring extension enabling native Application Performance Management (APM) for PHP

Patrick Allaert 310 Dec 4, 2022
Zipkin PHP is the official PHP Tracer implementation for Zipkin

Zipkin PHP is the official PHP Tracer implementation for Zipkin, supported by the OpenZipkin community. Installation composer require openz

Open Zipkin 250 Nov 12, 2022
Debug bar for PHP

PHP Debug Bar Displays a debug bar in the browser with information from php. No more var_dump() in your code! Features: Generic debug bar Easy to inte

Maxime Bouroumeau-Fuseau 4k Jan 8, 2023
Xdebug β€” Step Debugger and Debugging Aid for PHP

Xdebug Xdebug is a debugging tool for PHP. It provides step-debugging and a whole range of development aids, such as stack traces, a code profiler, fe

Xdebug 2.8k Jan 3, 2023
Kint - a powerful and modern PHP debugging tool.

Kint - debugging helper for PHP developers What am I looking at? At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug

null 2.7k Dec 25, 2022
😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.

Tracy - PHP debugger Introduction Tracy library is a useful helper for everyday PHP programmers. It helps you to: quickly detect and correct errors lo

Nette Foundation 1.6k Dec 23, 2022
PHP Benchmarking framework

PHPBench is a benchmark runner for PHP analogous to PHPUnit but for performance rather than correctness. Features include: Revolutions: Repeat your co

PHPBench 1.7k Jan 2, 2023
The Interactive PHP Debugger

The interactive PHP debugger Implemented as a SAPI module, phpdbg can exert complete control over the environment without impacting the functionality

Joe Watkins 841 Oct 9, 2022
Dontbug is a reverse debugger for PHP

Dontbug Debugger Dontbug is a reverse debugger (aka time travel debugger) for PHP. It allows you to record the execution of PHP scripts (in command li

Sidharth Kshatriya 709 Dec 30, 2022
PHP Debug Console

PHP Console A web console to try your PHP code into Creating a test file or using php's interactive mode can be a bit cumbersome to try random php sni

Jordi Boggiano 523 Nov 7, 2022
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. Th

Renato Cassino 190 Dec 3, 2022
PCOV - CodeCoverage compatible driver for PHP

PCOV A self contained CodeCoverage compatible driver for PHP Requirements and Installation See INSTALL.md API /** * Shall start recording coverage in

Joe Watkins 613 Dec 21, 2022
Low-overhead sampling profiler for PHP 7+

phpspy phpspy is a low-overhead sampling profiler for PHP. For now, it works with Linux 3.2+ x86_64 non-ZTS PHP 7.0+ with CLI, Apache, and FPM SAPIs.

Adam 1.3k Dec 24, 2022
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t

Symfony 7.1k Jan 1, 2023
PHP errors for cool kids

whoops PHP errors for cool kids whoops is an error handler framework for PHP. Out-of-the-box, it provides a pretty error interface that helps you debu

Filipe Dobreira 12.9k Dec 24, 2022
Clockwork - php dev tools in your browser - server-side component

Clockwork is a development tool for PHP available right in your browser. Clockwork gives you an insight into your application runtime - including requ

its 4.8k Dec 29, 2022
Laravel Debugbar (Integrates PHP Debug Bar)

Laravel Debugbar This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to th

Barry vd. Heuvel 14.8k Jan 9, 2023
This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception Tracking.

Tideways Middleware for Laravel Octane This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception T

Tideways 7 Jan 6, 2022
A tool to profile mysql queries in php env.

MysqlQueryProfiler This tool helps you to quickly profile a mysql query in a PHP 7.4+ environnement. You can also compare 2 queries. This image shows

null 8 Jul 30, 2021