Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Goodmain committed Jun 4, 2024
1 parent 8c47562 commit 4a388c7
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Laravel Telescope Extension

The library extends the [Laravel Telescope's](https://github.com/laravel/telescope) prune command.

## Installation

Install the package using the following command
Expand All @@ -12,27 +14,28 @@ That's it!

## Usage

Manually call the console command `telescope:prune` with your options. For example:
Manually call the console command `telescope:prune` with your options
or specify it into [schedule](https://laravel.com/docs/10.x/scheduling#scheduling-artisan-commands). For example:

```sh
php artisan telescope:prune --set-hours=request:240,query:24,unresolved-exception:480 --hours=100
```

The explanation: remove all records with entity type `request` older than 240 hours,
with entity type `query` older than 24 hours,
and entity type `unresolved-exception` older than 480 hours.
Also, remove records of all other entity types older than 100 hours.
The explanation: remove all records with entry type `request` older than 240 hours,
with entry type `query` older than 24 hours,
and entry type `unresolved-exception` older than 480 hours.
Also, remove records of all other entry types older than 100 hours.

Command's options have the following formats:

| Option | Format | Description |
|-------------|------------------------------------------------|------------------------------------------|
| --set-hours | [entity-type]:[hours],[entity-type]:[hours]... | List of rules for specified entity types |
| --hours | [hours] | Rule for all other entity types |
| Option | Format | Description |
|-------------|----------------------------------------------|-----------------------------------------|
| --set-hours | [entry-type]:[hours],[entry-type]:[hours]... | List of rules for specified entry types |
| --hours | [hours] | Rule for all other entry types |

Here is the list of possible `entity-type` values:
Here is the list of possible `entry-type` values:

| Entity Type |
| Entry Type |
|----------------------|
| batch |
| cache |
Expand Down

0 comments on commit 4a388c7

Please sign in to comment.