Skip to content

Send response headers on meta even without event#3653

Draft
estringana wants to merge 1 commit intomasterfrom
estringana/send-reponse-headers-whithout-event
Draft

Send response headers on meta even without event#3653
estringana wants to merge 1 commit intomasterfrom
estringana/send-reponse-headers-whithout-event

Conversation

@estringana
Copy link
Contributor

Description

Extension should make sure that response content-type and content-length are always presents on span tags. Even without appsec events

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@datadog-official
Copy link

datadog-official bot commented Feb 16, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 1026 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

    testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Fix with Cursor)

testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69943f9c0000000069224fb728aa923f
tid: 69943f9c00000000
hexProcessTraceId: 69224fb728aa923f
hexProcessSpanId: e01ab209f2862008
processTraceId: 7575705171270472255
processSpanId: 16148415169683660808

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
View all

ℹ️ Info

❄️ No new flaky tests detected

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

@pr-commenter
Copy link

pr-commenter bot commented Feb 16, 2026

Benchmarks [ appsec ]

Benchmark execution time: 2026-02-17 10:36:22

Comparing candidate commit 929d678 in PR branch estringana/send-reponse-headers-whithout-event with baseline commit c31cf60 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

@estringana estringana force-pushed the estringana/send-reponse-headers-whithout-event branch from 0a92b8e to 1a708f7 Compare February 17, 2026 09:29
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.20%. Comparing base (c31cf60) to head (929d678).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3653      +/-   ##
==========================================
- Coverage   62.21%   62.20%   -0.02%     
==========================================
  Files         141      141              
  Lines       13387    13388       +1     
  Branches     1753     1753              
==========================================
- Hits         8329     8328       -1     
- Misses       4260     4263       +3     
+ Partials      798      797       -1     
Files with missing lines Coverage Δ
appsec/src/extension/tags.c 80.33% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c31cf60...929d678. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@estringana estringana force-pushed the estringana/send-reponse-headers-whithout-event branch from 1a708f7 to 929d678 Compare February 17, 2026 09:56
Span span = trace.first()
assert span.metrics."_dd.appsec.enabled" == 1.0d
assert respContentType != null && respContentType.length() > 0
assert span.meta."http.response.headers.content-type" == respContentType
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could test the other three as well. BTW the PR description says it's content-length and -type that we're adding, but -encoding and -language are sent as well. Is this the intended behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants