1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 08:44:04 +00:00

Telescope integration

This commit is contained in:
Samuel Štancl 2019-08-19 21:33:44 +02:00
parent ba3d3c2469
commit e056b1242b
3 changed files with 31 additions and 1 deletions

View file

@ -36,6 +36,7 @@ return [
'Integrations' => [ 'Integrations' => [
'children' => [ 'children' => [
'Horizon' => 'docs/horizon', 'Horizon' => 'docs/horizon',
'Telescope' => 'docs/telescope',
], ],
], ],
'Tips' => [ 'Tips' => [

29
source/docs/telescope.md Normal file
View file

@ -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.