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

Collecting breadcrumbs and stacktraces #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Alex-Gramm
Copy link

This Pull Requests implements tracking all events with \Sentry\Breadcrumb to display in Breadcrumbs display.
Also implemented collecting $traces into \Sentry\Stacktrace

@CookiesEater CookiesEater self-assigned this Mar 29, 2021
@CookiesEater CookiesEater self-requested a review March 29, 2021 16:27
[$message, $tags, $exception, $type, $extra] = $this->parseText($text);

$metadata = [];
if(!empty($tags))
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for your work!
Please format code according to PSR-12 (spaces and braces)


\Sentry\captureEvent($event, EventHint::fromArray(array_filter([
'exception' => $data['exception'] ?? null,
'extra' => $data['extra'] ?? [],
Copy link
Member

Choose a reason for hiding this comment

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

Please check this line, it seems not the same extra data that we can attach to scope

Copy link
Author

Choose a reason for hiding this comment

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

All scope extra data will be directly copied into extra field of the each event in this method, so both extra arrays has same format

Copy link
Member

Choose a reason for hiding this comment

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

But it from Event object, not from EventHint
I've tested and received additional data in Sentry only with old code with setting extra on Event object
As I see, data from EventHint used in this and from extra only in this

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

Successfully merging this pull request may close these issues.

2 participants