Skip to content

horizon:clear-metrics does not properly clear metrics #1746

@mikescott

Description

@mikescott

Horizon Version

5.45.4

Laravel Version

12.55.1

PHP Version

8.4

Redis Driver

PhpRedis

Redis Version

6.3.0

Database Driver & Version

No response

Description

I enabled metrics in Horizon as per the instructions after several months in production. The first node on the chart showed a count of over 30,000 which obviously distorted the scale of the chart massive.

So I ran php artisan horizon:clear-metrics which cleared the contents of the pages /horizon/metrics/jobs and /horizon/metrics/queues

But when a new job came in the metrics came back, the new chart starts at 30,000 again.

Also after clearing metrics, and before any new job has run the page at /horizon/metrics/jobs/App\Path\To\Some\Job still has a chart with data even though it's no longer listed at /horizon/metrics/jobs

Steps To Reproduce

Run php artisan horizon:clear-metrics

Metrics are not properly cleared.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions