Skip to content

Conversation

@timacdonald
Copy link
Member

@timacdonald timacdonald commented Oct 9, 2025

We have several horizon instances running in different regions all within a single application.

When we get notifications from Horzion, we are unable to determine which instance of horizon the issue is occurring in.

Long Wait Detected
[Nightwatch] The "{queue}" queue on the "{connection}" connection has a wait time of {seconds} seconds.

The above notification could be any region and we have no way of knowing.

With this PR, we are able to name our Horizon instances while maintaining a single shared app name.

Long Wait Detected
[eu-central-1] The "{queue}" queue on the "{connection}" connection has a wait time of {seconds} seconds.

Long Wait Detected
[us-east-2] The "{queue}" queue on the "{connection}" connection has a wait time of {seconds} seconds.

Screenshot 2025-10-10 at 11 02 01

The default prefix also uses the APP_NAME, e.g., but I didn't want to break anything by changing this to respect the new var. It is right there in the config file for people to modify anyway.

    'prefix' => env(
        'HORIZON_PREFIX',
        Str::slug(env('APP_NAME', 'laravel'), '_').'_horizon:'
    ),

Comment on lines 132 to 138
protected function normalizeConfig(): void
{
if (! $this->app['config']->get('horizon.name')) {
$this->app['config']->set('horizon.name', $this->app['cofig']->get('app.name'));
}
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backfills the value on existing installs

@timacdonald timacdonald marked this pull request as ready for review October 10, 2025 00:19
@taylorotwell taylorotwell merged commit eccc804 into 5.x Oct 10, 2025
16 checks passed
@taylorotwell taylorotwell deleted the horizon-name branch October 10, 2025 13:44
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.

3 participants