Repository navigation
Enable DSM tests for PHP [php@feat/arjun.guha/dsm-php-integration] - #8202
Draft
arjunguhaswe wants to merge 2 commits into
Draft
arjunguhaswe wants to merge 2 commits into
arjunguhaswe wants to merge 2 commits into
Conversation
Add a /dsm endpoint to the plain PHP weblog (php-fpm and apache-mod): Kafka through php-rdkafka, RabbitMQ direct, topic and fanout exchanges through php-amqplib, and /dsm/inject and /dsm/extract. Install the clients in the base images, enable DSM there, and enable the tests from 1.27.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
|
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 3 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)🧪 All tests passed Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: aeb0812 | Docs | View more details | Give us feedback! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
DataDog/dd-trace-php#4380 adds Data Streams Monitoring to the PHP tracer for Kafka (php-rdkafka) and RabbitMQ (php-amqplib), to ship in 1.27.0. This enables the DSM tests for PHP.
Changes
weblogs/plain/dsm.php, shared by the php-fpm and apache-mod weblogs:/dsm?integration=kafka|rabbitmq|rabbitmq_topic_exchange|rabbitmq_fanout_exchangeproduces, then consumes, and answersokonly once every message it waits for has been consumed.group.idset, instead of subscribing.Test_DsmKafkauses the default 5 s request timeout, and assigning skips the group rebalance. Locally, requests took 20-90 ms, and the checkpoints still carrygroup:./dsm/injectand/dsm/extractcall the tracer's checkpoint function, as the Node.js and Python weblogs call theirs.socketsandrdkafkaincommon/php.ini;DD_DATA_STREAMS_ENABLED=true.test_dsm_kafka_without_cluster_id, as for .NET. php-rdkafka doesn't expose the cluster id, sotest_dsm_kafkaismissing_feature.missing_feature, because PHP has no public manual checkpoint API. HTTP, SQS, SNS and Kinesis aren't implemented in the tracer.base-images.lock.jsonregenerated for the 25 PHP base images.Testing
Run locally (arm64) against a tracer built from the head of DataDog/dd-trace-php#4380:
[php@feat/arjun.guha/dsm-php-integration]in the title points the dev weblogs at #4380. It needsghcr.io/datadog/dd-trace-php/dd-library-php:feat-arjun-guha-dsm-php-integration, which dd-trace-php's CI hasn't published yet; I couldn't find an image for any open dd-trace-php PR. The target branch is also why "Fail if target branch is specified" fails.Before merging
build_base_imageshas published the PHP base images, runutils/scripts/update_mirror_images.pyand commit the result.🤖 Generated with Claude Code