Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track DD_TRACE_DEBUG=1 errors in integration and web tests #2472

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

bwoebi
Copy link
Collaborator

@bwoebi bwoebi commented Jan 15, 2024

Description

Fix reporting @-suppressed errors within the sandbox.

Also prefix all ddtrace errors with [ddtrace] [loglevel] to make them easily greppable.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

Fix reporting @-suppressed errors within the sandbox.

Also prefix all ddtrace errors with [ddtrace] [loglevel] to make them easily greppable.

Signed-off-by: Bob Weinand <[email protected]>
@bwoebi bwoebi requested a review from a team as a code owner January 15, 2024 16:33
@pr-commenter
Copy link

pr-commenter bot commented Jan 15, 2024

Benchmarks

Benchmark execution time: 2024-01-15 17:00:32

Comparing candidate commit 431b32e in PR branch bob/integration-error-tracking with baseline commit 4b6bccc in branch master.

Found 3 performance improvements and 2 performance regressions! Performance is the same for 34 metrics, 51 unstable metrics.

scenario:HookBench/benchHookOverheadInstallHookOnFunction

  • 🟩 execution_time [-76.835µs; -36.279µs] or [-9.331%; -4.406%]

scenario:HookBench/benchHookOverheadInstallHookOnMethod

  • 🟩 execution_time [-63.571µs; -18.822µs] or [-7.819%; -2.315%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟩 execution_time [-8.488µs; -6.172µs] or [-5.261%; -3.825%]

scenario:PHPRedisBench/benchRedisOverhead

  • 🟥 execution_time [+69.814µs; +332.870µs] or [+2.635%; +12.563%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+175.781ns; +323.019ns] or [+2.835%; +5.209%]

Comment on lines 217 to +218
zend_replace_error_handling(EH_NORMAL, NULL, NULL);
EG(error_reporting) = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we adding the EG(error_reporting) = 0; instruction here? Isn't zend_replace_error_handling(EH_NORMAL, NULL, NULL); already doing that considering that EH_NORMAL equals zero

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, EH_NORMAL and EH_THROW are the values, and it means that errors should not throw. EG(error_reporting) is the actual error level.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah, misread error_handling for error_reporting 😬

Copy link
Contributor

@PROFeNoM PROFeNoM left a comment

Choose a reason for hiding this comment

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

Really nice to have!

@bwoebi bwoebi merged commit bef72a5 into master Jan 16, 2024
617 of 620 checks passed
@bwoebi bwoebi deleted the bob/integration-error-tracking branch January 16, 2024 11:13
@github-actions github-actions bot added this to the 0.97.0 milestone Jan 16, 2024
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.

2 participants