-
Notifications
You must be signed in to change notification settings - Fork 17
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
Added Airbrake Adapter #18
base: main
Are you sure you want to change the base?
Conversation
@christyjacob4 The CI is failing as there are no test ENVs provided. |
Thank you so much for the PR 🤩. We're adding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR! 🤯 We left some comments during the review, please check them out.
foreach ($breadcrumbObjects as $breadcrumbObject) { | ||
$error = [ | ||
"type" => $breadcrumbObject->getType(), | ||
"message" => $breadcrumbObject->getMessage() | ||
]; | ||
|
||
\array_push($errors, $error); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding the breadcrumbs to errors, I think it should come from $log->getExtra()['detailedTrace']
. See
logger/src/Logger/Adapter/Sentry.php
Lines 65 to 73 in e6a8ff4
if (isset($log->getExtra()['detailedTrace'])) { | |
foreach ($log->getExtra()['detailedTrace'] as $trace) { | |
\array_push($stackFrames, [ | |
'filename' => $trace['file'], | |
'lineno' => $trace['line'], | |
'function' => $trace['function'], | |
]); | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @stnguyen90 , sorry for being inactive here and responding so late.
Looking at your comment and the airbrake docs, I think the detailedTrace
should go in error/{i}/backtrace
as per the doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am suggesting this change:
foreach ($breadcrumbObjects as $breadcrumbObject) { | |
$error = [ | |
"type" => $breadcrumbObject->getType(), | |
"message" => $breadcrumbObject->getMessage() | |
]; | |
\array_push($errors, $error); | |
} | |
foreach ($breadcrumbObjects as $breadcrumbObject) { | |
$backtraces = []; | |
foreach ($detailedTraces as $detailedTrace) { | |
$backtrace = [ | |
"file" => $detailedTrace['file'], | |
"line" => $detailedTrace['line'], | |
"function" => $detailedTrace['function'] | |
]; | |
\array_push($backtraces, $backtrace); | |
} | |
$error = [ | |
"type" => $breadcrumbObject->getType(), | |
"message" => $breadcrumbObject->getMessage(), | |
"backtrace" => $backtraces | |
]; | |
\array_push($errors, $error); | |
} |
@devblin please address the comments |
@devblin thanks a lot for your contributions during Hacktoberfest 2022! Please reach out to me on our Discord server if you would like to claim your Appwrite swags! As a way of saying thank you, we would also love to invite you to join the Appwrite organization on GitHub. Please share your GitHub username with us on Discord. Also let us know if you'd like to continue working on this PR. |
Hey @christyjacob4 , I am unable to accept the discord server invite. |
Also, @christyjacob4 can you please address my comment on the suggested change for this comment ?. |
@christyjacob4 I would like to continue working on this PR, I was waiting for the response from the team 😅 |
@christyjacob4 I remember, I was blocked from server due to unwanted spam messages from my discord id. Can you please check if I am banned ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are merge conflicts.
Implements appwrite/appwrite#4213