kowal.info

Sentry Integration

Composer kowal/module-sentry · Version 1.0.8

Product page

Sentry Integration — kowal.co

Description

Sends Magento events to Sentry so teams can investigate backend and browser errors by environment and release.

For whom

For developers and operation teams investigating PHP errors, JavaScript failures and cron activity.

Features

  • PHP backend monitoring and separate browser configuration.
  • Environment and release tags.
  • Commands for testing error events, transactions and cron check-ins.

Installation

From the Magento root, with Composer access to the Kowal package, run

composer require kowal/module-sentry
bin/magento module:enable Kowal_Sentry
bin/magento setup:upgrade
bin/magento cache:clean

Configuration

  1. Under Stores → Configuration → Kowal → Sentry → General, enable the module and give the environment a distinct name such as staging.
  2. Under Backend SDK, enable monitoring and enter the project DSN. Paste the DSN URL by itself, without an SDK initialization snippet.
  3. To collect browser events, configure the Frontend DSN separately. Save and refresh the configuration cache.

Requirements / notes

The package requires PHP matching ^8.1, kowal/base and sentry/sentry ^4.24. Composer installs it under vendor/kowal/module-sentry.

FAQ

Why is a backend test missing from the expected project?

Compare the Backend DSN with the project you are viewing in Sentry. Check the backend monitoring switch, error sample rate and environment filter.

Verify the installation

bin/magento module:status Kowal_Sentry

On staging, enable Enable Test Commands and run bin/magento kowal:sentry:test:error. Find the event in the target Sentry project and compare its environment with the value configured in Magento.