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

fix(agent): Add missing errors decode and prioritization #850

Merged
merged 11 commits into from
Mar 14, 2024

Conversation

zsistla
Copy link
Contributor

@zsistla zsistla commented Mar 12, 2024

Add remaining error codes listed in https://github.com/php/php-src/blob/master/Zend/zend_errors.h for completeness in decoding and prioritizing errors.

Added/modified tests accordingly.

Some of the PHP error codes found in php-src\Zend\zend_errors.h were not included.
Added the missing codes to properly prioritize and convert to error.class string.
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.76%. Comparing base (86f7753) to head (4c22eb7).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #850      +/-   ##
==========================================
+ Coverage   78.71%   78.76%   +0.04%     
==========================================
  Files         193      193              
  Lines       27109    27125      +16     
==========================================
+ Hits        21339    21365      +26     
+ Misses       5770     5760      -10     
Flag Coverage Δ
agent-for-php-7.0 77.82% <100.00%> (+0.03%) ⬆️
agent-for-php-7.1 77.58% <100.00%> (+0.06%) ⬆️
agent-for-php-7.2 78.15% <100.00%> (+0.06%) ⬆️
agent-for-php-7.3 78.17% <100.00%> (+0.06%) ⬆️
agent-for-php-7.4 77.87% <100.00%> (+0.09%) ⬆️
agent-for-php-8.0 77.90% <100.00%> (+0.05%) ⬆️
agent-for-php-8.1 77.88% <100.00%> (+0.05%) ⬆️
agent-for-php-8.2 ?
agent-for-php-8.3 77.48% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zsistla zsistla added this to the next-release milestone Mar 12, 2024
@airtonzanon
Copy link

I think with this change, flagging the Error.Class of different types of errors and their own class and not as Error, solves the problem on #843, no?

agent/php_error.c Outdated Show resolved Hide resolved
@zsistla
Copy link
Contributor Author

zsistla commented Mar 13, 2024

I think with this change, flagging the Error.Class of different types of errors and their own class and not as Error, solves the problem on #843, no?

HI @airtonzanon thanks for participating in the repo discussions.
This fixes the E_DEPRECATED and E_USER_DEPRECATED being reported with error class Error.
The other issues in 843 center around the increase in all errors being reported that were previously not reported if they were handled by error handlers other than PHPs standard error handler. We are still investigating paths forward with that issue.

agent/php_error.h Outdated Show resolved Hide resolved
zsistla and others added 2 commits March 13, 2024 18:23
Co-authored-by: Michal Nowacki <mnowacki@newrelic.com>
@zsistla zsistla merged commit c497191 into dev Mar 14, 2024
58 checks passed
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.

None yet

5 participants