Skip to content

[PHP] Enable span headers tags on PHP#6330

Draft
estringana wants to merge 1 commit intomainfrom
estringana/enable-span-tags-headers-php
Draft

[PHP] Enable span headers tags on PHP#6330
estringana wants to merge 1 commit intomainfrom
estringana/enable-span-tags-headers-php

Conversation

@estringana
Copy link
Contributor

Motivation

Enable PHP system tests which ensures content-type and content-length are sent even when appsec does not generate an event

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php

@datadog-official
Copy link

datadog-official bot commented Feb 17, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 32 Tests failed

tests.appsec.test_span_tags_headers.Test_Headers_Event_No_Blocking.test_content_type_event[php-fpm-7.0] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Expected content-length header to be present
assert None is not None

self = <tests.appsec.test_span_tags_headers.Test_Headers_Event_No_Blocking object at 0x7fdce891b8f0>

    def test_content_type_event(self):
        # Send a request that triggers a security event but not blocking - should have the content-type and content-length tags
        assert self.r.status_code == 200
        interfaces.library.assert_waf_attack(self.r, rule="ttr-000-003")
        # content-length is mandatory on this endpoint
...
tests.appsec.test_span_tags_headers.Test_Headers_Event_No_Blocking.test_content_type_event[php-fpm-7.1] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Expected content-length header to be present
assert None is not None

self = <tests.appsec.test_span_tags_headers.Test_Headers_Event_No_Blocking object at 0x7f565c60b200>

    def test_content_type_event(self):
        # Send a request that triggers a security event but not blocking - should have the content-type and content-length tags
        assert self.r.status_code == 200
        interfaces.library.assert_waf_attack(self.r, rule="ttr-000-003")
        # content-length is mandatory on this endpoint
...
tests.appsec.test_span_tags_headers.Test_Headers_Event_No_Blocking.test_content_type_event[php-fpm-7.2] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Expected content-length header to be present
assert None is not None

self = <tests.appsec.test_span_tags_headers.Test_Headers_Event_No_Blocking object at 0x7fbd0dede450>

    def test_content_type_event(self):
        # Send a request that triggers a security event but not blocking - should have the content-type and content-length tags
        assert self.r.status_code == 200
        interfaces.library.assert_waf_attack(self.r, rule="ttr-000-003")
        # content-length is mandatory on this endpoint
...
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4c8a7c2 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@estringana estringana force-pushed the estringana/enable-span-tags-headers-php branch from 856d687 to 4c8a7c2 Compare February 18, 2026 16:24
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

Comments