diff --git a/navigation.php b/navigation.php index 7972ff0c..aaebf25c 100644 --- a/navigation.php +++ b/navigation.php @@ -36,6 +36,7 @@ return [ 'Integrations' => [ 'children' => [ 'Horizon' => 'docs/horizon', + 'Telescope' => 'docs/telescope', ], ], 'Tips' => [ diff --git a/source/docs/horizon.md b/source/docs/horizon.md index 38f35820..a95a7b93 100644 --- a/source/docs/horizon.md +++ b/source/docs/horizon.md @@ -15,4 +15,4 @@ Jobs are automatically tagged with the tenant's uuid and domain: You can use these tags to monitor specific tenants' jobs: -![Monitoring tags](https://i.imgur.com/qB6veK7.png) \ No newline at end of file +![Monitoring tags](https://i.imgur.com/qB6veK7.png) diff --git a/source/docs/telescope.md b/source/docs/telescope.md new file mode 100644 index 00000000..ee9cb5ea --- /dev/null +++ b/source/docs/telescope.md @@ -0,0 +1,29 @@ +--- +title: Telescope Integration +description: Telescope Integration with stancl/tenancy — A Laravel multi-database tenancy package that respects your code.. +extends: _layouts.documentation +section: content +--- + +# Telescope Integration + +Requests in Telescope are automatically tagged with the tenant uuid and domain: + +![Telescope Request with tags](https://i.imgur.com/CEEluYj.png) + +This lets you filter requests by uuid and domain: + +![Filtering by uuid](https://i.imgur.com/SvbOa7S.png) +![Filtering by domain](https://i.imgur.com/dCJuEr1.png) + +If you'd like to set Telescope tags in your own code, e.g. in your `AppServiceProvider`, replace your `Telescope::tag()` call like this: +```php +\Tenancy::integrationEvent('telescope', function ($entry) { + return ['abc']; // your logic +}); +``` +![Tenancy tags merged with tag abc](https://i.imgur.com/4p1wOiM.png) + +Once Telescope 3 is released, you won't have to do this. + +To have Telescope working, make sure your `telescope.storage.database.connection` points to a non-tenant connection. It's that way by default, so for most projects, Telescope should work out of the box. \ No newline at end of file