dd-trace-php
dd-trace-php copied to clipboard
fix: Add `ddsource` attribute to json-formatted logs
Description
Problem: The PHP Log pipeline is not automatically used to process PHP logs ==> No Log Correlation by default, despite the trace identifiers being injected.
Two solutions:
- We inject the trace identifiers outside of
context - We use
ddsource
Either way, it seems like we should have always been using ddsource + it is more elegant and is the actual way of doing it.
TBD - I gotta double test this on my sandbox. generating the artifact...
Reviewer checklist
- [ ] Test coverage seems ok.
- [ ] Appropriate labels assigned.
Benchmarks
Benchmark execution time: 2024-06-20 15:00:03
Comparing candidate commit e1b1f330a66021b428e9dae01599cef76ecec51c in PR branch alex/fix/ddsource with baseline commit 3648fb565a58e8a542c85ba360187a16448ceb24 in branch master.
Found 0 performance improvements and 5 performance regressions! Performance is the same for 173 metrics, 0 unstable metrics.
scenario:PDOBench/benchPDOBaseline
- 🟥
execution_time[+5.618µs; +13.686µs] or [+3.187%; +7.764%]
scenario:PDOBench/benchPDOBaseline-opcache
- 🟥
execution_time[+3.641µs; +12.147µs] or [+2.075%; +6.924%]
scenario:PDOBench/benchPDOOverhead-opcache
- 🟥
execution_time[+16.887µs; +18.821µs] or [+5.976%; +6.661%]
scenario:PDOBench/benchPDOOverheadWithDBM
- 🟥
execution_time[+9.917µs; +13.735µs] or [+3.281%; +4.544%]
scenario:PDOBench/benchPDOOverheadWithDBM-opcache
- 🟥
execution_time[+8.841µs; +16.218µs] or [+2.784%; +5.108%]
Codecov Report
Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
Project coverage is 65.96%. Comparing base (
3648fb5) to head (17bd3f3). Report is 8 commits behind head on master.
:exclamation: There is a different number of reports uploaded between BASE (3648fb5) and HEAD (17bd3f3). Click for more details.
HEAD has 3 uploads less than BASE
Flag BASE (3648fb5) HEAD (17bd3f3) tracer-php 12 10 appsec-extension 1 0
Additional details and impacted files
@@ Coverage Diff @@
## master #2727 +/- ##
=============================================
- Coverage 77.83% 65.96% -11.88%
Complexity 2212 2212
=============================================
Files 227 201 -26
Lines 26604 22596 -4008
Branches 988 0 -988
=============================================
- Hits 20708 14906 -5802
- Misses 5370 7690 +2320
+ Partials 526 0 -526
| Flag | Coverage Δ | |
|---|---|---|
| appsec-extension | ? |
|
| tracer-extension | 78.60% <ø> (+<0.01%) |
:arrow_up: |
| tracer-php | 47.56% <0.00%> (-32.97%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| src/DDTrace/Integrations/Logs/LogsIntegration.php | 0.00% <0.00%> (-93.29%) |
:arrow_down: |
... and 66 files 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 dataPowered by Codecov. Last update 3648fb5...17bd3f3. Read the comment docs.