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

[Feature Request] Link Exception with Source #675

Closed
dbpolito opened this issue Aug 7, 2019 · 6 comments
Closed

[Feature Request] Link Exception with Source #675

dbpolito opened this issue Aug 7, 2019 · 6 comments

Comments

@dbpolito
Copy link

dbpolito commented Aug 7, 2019

On production, when exception happens it doesn't have any link to Source (Request, Job, Command, Schedule).

Would be great if we could save them in case of failure and link from the Exception panel.

@barryvdh
Copy link
Contributor

It would be useful to add at least the Request info, but filtering now happens based on just the IncomingEntry. In that case it would need to be determined if the batch contains anything that needs to be logged.

@barryvdh
Copy link
Contributor

You can adjust the Filter method in your ServiceProvider to record Request entries when the status is 500. This way, when an Exception occurs, the Request will be added/linked also:

Telescope::filter(function (IncomingEntry $entry) {
	if ($this->app->isLocal()) {
		return true;
	}


	return $entry->isReportableException() ||
		   $entry->isFailedJob() ||
 		   ($entry->type === EntryType::REQUEST && ($entry->content['response_status'] ?? null) === 500) ||
		   $entry->isScheduledTask() ||
		   $entry->hasMonitoredTag();
});

Perhaps it would be useful to add this by default?

@barryvdh
Copy link
Contributor

See #685

@dbpolito
Copy link
Author

Yes, great PR, hopefully this gets merged but i will definitely adjust my apps with this. Thank you!

@barryvdh
Copy link
Contributor

It's merged (not tagged yet), so this can be closed?

@dbpolito
Copy link
Author

Yep, thank you

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

No branches or pull requests

2 participants