Production or staging alert? Separate Magento 2 environments in Sentry

technical store observability with the Kowal_Sentry module

1 min read

Two separate silver event receivers with black and burgundy interiors

When a similar error appears in production and staging, check the Sentry project, environment and deployed version. These values identify the installation that produced an event even when both run the same code.

Record each deployment’s project, environment and release

In Kowal Sentry 1.0.8, set Environment under General for each deployment and compare Backend DSN with the intended project. The DSN selects the receiving project, environment identifies the environment and release identifies the deployed version. Within one project you can filter by environment. For two separate projects, configure their respective DSNs. If browser monitoring is enabled, also check Frontend DSN. Kowal Sentry. Sentry PHP SDK options.

Compare two controlled events

The local test ran the module’s test command with two configurations and a simulated receiver. Both events had the same message and release. Their initialization options differed by project and environment. The project numbers and event IDs below came from the sample.

Two local backend test configurations
Test configurationProject from DSNEnvironmentReleaseEvent ID
Production101productionshop@2026.12.02test-101
Staging102stagingshop@2026.12.02test-102

On staging, check the target project, switch on Enable Test Commands and run bin/magento kowal:sentry:test:error. Look up the event ID in Sentry and compare project, environment and release. If the event is missing, check backend monitoring and error sampling. For production, check an existing event from the deployed version. Kowal Sentry test instructions.

The earlier Sentry guide covers backend and browser monitoring.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)