Skip to content

Conversation

@MishukAdhikari
Copy link
Contributor

To filter slow query it looks like

Telescope::filter(function (IncomingEntry $entry) {

    return $entry->type === EntryType::QUERY && ($entry->content['slow'] ?? false);

});

If we use method it's much more readable and easy to add multiple or

Telescope::filter(function (IncomingEntry $entry) { 
    return $entry->isSlowQuery();
});

@taylorotwell taylorotwell merged commit ce9e6b5 into laravel:4.x Nov 15, 2021
MishukAdhikari added a commit to MishukAdhikari/docs that referenced this pull request Nov 17, 2021
As this PR has been merged I think it's better to add the method in documentation so it will be easier for developers to find it.


laravel/telescope#1146
taylorotwell pushed a commit to laravel/docs that referenced this pull request Nov 17, 2021
As this PR has been merged I think it's better to add the method in documentation so it will be easier for developers to find it.


laravel/telescope#1146
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