justbetter / magento2-sentry

justbetter/magento2-sentry

Magento 2 Logger for Sentry

magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Fail Tests: N/A Security: Pass MIT

Are you the maintainer of justbetter?

Packagento pulls justbetter's Composer packages from the public registry so buyers can find them here.

Claim the namespace to take ownership, publish new releases directly, and start charging for premium versions.

Claim this namespace →

Package banner

Magento 2 Sentry Logger

Latest Version on Packagist
Total Downloads
Magento Support
PHPStan passing

This Magento 2 module integrates Sentry into magento 2.
Depending on the log level configured in the backend of magento 2, notifications and errors can be sent to sentry.

Features

  • Send exceptions and logs to Sentry
  • Show detailed context on thrown exceptions (Like Magento user/api consumer id)
  • Easily control which events get sent to Sentry
  • Backend and frontend error reporting
  • Performance sampling (tracing & profiling)
  • Cron Monitoring
  • Session replay
  • Sentry feedback form after an error

LogRocket? LogRocket support moved out of this module into justbetter/magento2-sentry-logrocket as of 5.0.0. If you were using it before, install that module — no configuration changes needed.

Installation

  • composer require justbetter/magento2-sentry
  • bin/magento module:enable JustBetter_Core JustBetter_Sentry
  • bin/magento setup:upgrade
  • bin/magento setup:di:compile
  • bin/magento setup:static-content:deploy

Configuration

For configuration with Adobe Cloud, check below.

This module uses the Magento Deployment Configuration for most it's configuration. This means that you need to add this array to your app/etc/env.php:

'sentry' => [
    'dsn' => 'example.com',
    'environment' => null,
    'log_level' => \Monolog\Level::Warning->value,
    'exception_log_levels' => [
        \GraphQL\Error\Error::class => \Monolog\Level::Error->value,
    ],
    'graphql_report_client_safe_errors' => false,
    'error_types' => E_ALL,
    'ignore_exceptions' => [],
    'mage_mode_development' => false,
    'js_sdk_version' => \JustBetter\Sentry\Block\SentryScript::CURRENT_VERSION,
    'tracing_enabled' => true,
    'traces_sample_rate' => 0.5,
    'disable_default_integrations' => [
        \Sentry\Integration\ModulesIntegration::class,
    ],
    'performance_tracking_enabled' => true,
    'performance_tracking_excluded_areas' => [\Magento\Framework\App\Area::AREA_ADMINHTML, \Magento\Framework\App\Area::AREA_CRONTAB],
    'profiles_sample_rate' => 0.5,
    'ignore_js_errors' => [],
    'enable_csp_report_url' => true,
    // Resilient delivery
    'async_sending_enabled' => true,
    'circuit_breaker_failure_threshold' => 5,
    'circuit_breaker_recovery_timeout' => 60,
    'circuit_breaker_success_threshold' => 2,
    'http_timeout' => 2,
    'http_connect_timeout' => 1,
]

Next to that there are some configuration options under Stores > Configuration > JustBetter > Sentry.

Configuration values

Name Default Description
dsn — The DSN you got from Sentry for your project. You can find the DSN in the project settings under "Client Key (DSN)"
release the current deployed version in deployed_version.txt Specify the current release version. Example with dynamic git hash: trim(exec('git --git-dir ' . BP . '/.git' . ' log --pretty="%h" -n1 HEAD'))
mage_mode_development false If set to true, you will receive issues in Sentry even if Magento is running in develop mode.
environment — Specify the environment under which the deployed version is running. Common values: production, staging, development. Helps differentiate errors between environments.
max_breadcrumbs 100 This variable controls the total amount of breadcrumbs that should be captured.
attach_stacktrace false When enabled, stack traces are automatically attached to all messages logged. Even if they are not exceptions.
prefixes [BP] A list of prefixes that should be stripped from the filenames of captured stacktraces to make them relative.
sample_rate 1.0 Configures the sample rate for error events, in the range of 0.0 to 1.0.
ignore_exceptions [] If the class being thrown matches any in this list, do not send it to Sentry, e.g., [\Magento\Framework\Exception\NoSuchEntityException::class]
error_types E_ALL If the Exception is an instance of ErrorException, send the error to Sentry if it matches the error reporting. Uses the same syntax as Error Reporting, e.g., E_ERROR
log_level \Monolog\Level::Warning Specify from which logging level on Sentry should get the messages.
exception_log_levels [] Override log_level per exception class, e.g. [\GraphQL\Error\Error::class => \Monolog\Level::Error->value]. Previous exceptions are checked as well, the first match wins. See GraphQL errors.
graphql_report_client_safe_errors false If set to true, client safe GraphQL errors (e.g. not logged in or an invalid coupon code) also use exception_log_levels. Otherwise they use log_level.
clean_stacktrace true Whether unnecessary files (like Interceptor.php, Proxy.php, and Factory.php) should be removed from the stacktrace. (They will not be removed if they threw the error.)
tracing_enabled false If set to true, tracing is enabled (bundle file is loaded automatically).
traces_sample_rate 0.2 If tracing is enabled, set the sample rate. A number between 0 and 1, controlling the percentage chance a given transaction will be sent to Sentry.
traces_sample_rate_cli The value of traces_sample_rate If tracing is enabled, set the sample rate for CLI. A number between 0 and 1, controlling the percentage chance a given transaction will be sent to Sentry.
profiles_sample_rate 0 (disabled) if this option is larger than 0 (zero), the module will create a profile of the request. Please note that you have to install Excimer on your server to use profiling. Sentry documentation. You have to enable tracing too.
performance_tracking_enabled false if performance tracking is enabled, a performance report gets generated for the request.
performance_tracking_excluded_areas ['adminhtml', 'crontab'] if performance_tracking_enabled is enabled, we recommend to exclude the adminhtml & crontab area.
enable_logs false This option enables the logging integration, which allows the SDK to capture logs and send them to Sentry.
logger_log_level \Monolog\Level::Notice If the logging integration is enabled, specify from which logging level the logger should log
js_sdk_version \JustBetter\Sentry\Block\SentryScript::CURRENT_VERSION If set, loads the explicit version of the JavaScript SDK of Sentry.
ignore_js_errors [] Array of JavaScript error messages which should not be sent to Sentry. (See also ignoreErrors in Sentry documentation)
disable_default_integrations [] Provide a list of FQCN of default integrations you do not want to use. List of default integrations.
cron_monitoring_enabled false Wether to enable cron check ins
track_crons [] Cron handles of crons to track with cron monitoring, Sentry only supports 6 check-ins per minute Magento does many more.
spotlight false Enable Spotlight on the page
spotlight_url - Override the Sidecar url
enable_csp_report_url false If set to true, the report-uri will be automatically added based on the DSN.
async_sending_enabled false Send Sentry events asynchronously via Magento Message Queue (justbetter.sentry.event.send).
circuit_breaker_failure_threshold 5 Consecutive HTTP failures before the circuit opens.
circuit_breaker_recovery_timeout 60 Seconds to wait before allowing a probe request after the circuit opens.
circuit_breaker_success_threshold 2 Successful probes in half-open state required before closing the circuit.
http_timeout 2 Total HTTP timeout (seconds) for Sentry envelope delivery (sync + consumer).
http_connect_timeout 1 HTTP connect timeout (seconds) for Sentry envelope delivery.

Resilient delivery

Event delivery can be configured as either synchronous or asynchronous:

  1. (Default) Sync mode (async_sending_enabled = false): Events are sent over HTTP immediately.
  2. Async mode (async_sending_enabled = true): Events are serialized immediately with exact capture timestamps and published to the justbetter.sentry.event.send message queue. A background consumer delivers them to Sentry via HTTP.

Both modes share two safeguards, kept in the Magento cache so every process sees them:

  • Circuit breaker (Sentry is unreachable): when consecutive failures (5xx, network errors) reach circuit_breaker_failure_threshold, the circuit opens. All events are dropped without blocking Magento until circuit_breaker_recovery_timeout has passed.
  • Rate limits (Sentry refuses a data category, e.g. quota exhausted): Sentry's X-Sentry-Rate-Limits header is tracked per category (errors, transactions, cron check-ins, logs), until the time Sentry sends. A limit on one category does not block the others, so cron check-ins keep arriving when the transaction quota runs out. A Retry-After header without categories, or a bare HTTP 429, limits all categories; the bare 429 lasts circuit_breaker_recovery_timeout.
  • While either applies, async mode does not publish the affected events, and the consumer drops queued ones without calling Sentry.

The consumer never retries a failed envelope. Failures are written to var/log/sentry.log and are never sent to Sentry themselves. Rate-limit responses are not logged: they are expected while the quota is exhausted, and delivery already backs off.

To run the queue consumer manually:

bin/magento queue:consumers:start justbetter.sentry.event

Javascript issue grouping

These settings live in the Magento configuration under Stores > Configuration > JustBetter > Sentry > Sentry issue
grouping (sentry/issue_grouping/*).

Name Default Description
strip_static_content_version false Strip version1234567890/ from stacktrace filenames so a static content deploy does not create new issues.
strip_store_code false Strip the store code from stacktrace filenames. Replaces the first occurrence only.
add_action_context false Send the Magento controller action of the current page (for example catalog_product_view, the same value Magento adds to the body tag) to the browser. Every Javascript event gets the magento.route, magento.controller, magento.action and magento.full_action tags, event.transaction is set to the full action name, and the pageload transaction is named after the action instead of the URL path.

Errors thrown from inline scripts (x-magento-init, inline require([...]), inline event handlers) are reported by the
browser with the page URL as their filename, so Sentry creates a separate issue for every product, category and CMS URL.
Group these with Sentry's own project settings: a Stack Trace Rule
like family:javascript stack.abs_path:"*.html" -group removes document-URL frames from grouping entirely, and
Fingerprint Rules can use
{{ transaction }}, which is the full action name once add_action_context is enabled, to group them per page type.

Adding your own Javascript context

add_action_context dispatches the sentry_javascript_context event with a Magento\Framework\DataObject before it
is rendered, so you can add tags or change the transaction name:

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $context = $observer->getEvent()->getContext();
    $context->setData('tags', array_merge($context->getData('tags'), ['magento.theme' => 'hyva']));
}

The result is rendered inline into the (possibly full-page-cached) HTML and is readable as
window.sentryMagentoContext, so anything you add must be derivable from the URL alone and must never contain
customer data.

Configuration for Adobe Cloud

Since Adobe Cloud doesn't allow you to add manually add content to the env.php file, the configuration can be done
using the "Variables" in Adobe Commerce using the following variables:

Name Type
CONFIG__SENTRY__ENVIRONMENT__ENABLED boolean
CONFIG__SENTRY__ENVIRONMENT__DSN string
CONFIG__SENTRY__ENVIRONMENT__MAGE_MODE_DEVELOPMENT string
CONFIG__SENTRY__ENVIRONMENT__ENVIRONMENT string
CONFIG__SENTRY__ENVIRONMENT__MAX_BREADCRUMBS integer
CONFIG__SENTRY__ENVIRONMENT__ATTACH_STACKTRACE boolean
CONFIG__SENTRY__ENVIRONMENT__SAMPLE_RATE float
CONFIG__SENTRY__ENVIRONMENT__IGNORE_EXCEPTIONS JSON array of classes
CONFIG__SENTRY__ENVIRONMENT__ERROR_TYPES integer
CONFIG__SENTRY__ENVIRONMENT__LOG_LEVEL integer
CONFIG__SENTRY__ENVIRONMENT__EXCEPTION_LOG_LEVELS JSON object of classes and log levels
CONFIG__SENTRY__ENVIRONMENT__GRAPHQL_REPORT_CLIENT_SAFE_ERRORS boolean
CONFIG__SENTRY__ENVIRONMENT__CLEAN_STACKTRACE boolean
CONFIG__SENTRY__ENVIRONMENT__TRACING_ENABLED boolean
CONFIG__SENTRY__ENVIRONMENT__TRACES_SAMPLE_RATE float
CONFIG__SENTRY__ENVIRONMENT__PROFILES_SAMPLE_RATE float
CONFIG__SENTRY__ENVIRONMENT__PERFORMANCE_TRACKING_ENABLED boolean
CONFIG__SENTRY__ENVIRONMENT__PERFORMANCE_TRACKING_EXCLUDED_AREAS boolean
CONFIG__SENTRY__ENVIRONMENT__ENABLE_LOGS boolean
CONFIG__SENTRY__ENVIRONMENT__LOGGER_LOG_LEVEL boolean
CONFIG__SENTRY__ENVIRONMENT__JS_SDK_VERSION string
CONFIG__SENTRY__ENVIRONMENT__IGNORE_JS_ERRORS JSON array of error messages

The following configuration settings can be overridden in the Magento admin. This is limited to ensure that changes to
particular config settings can only be done on server level and can't be broken by changes in the admin.

Please note, that it is not possible to use profiling within the Adobe Cloud.

GraphQL errors

Magento logs every GraphQL error with level ERROR (400). With log_level set to CRITICAL (500) these never reach Sentry, which hides bugs in GraphQL based checkouts (like Rapidez).
Use exception_log_levels to send GraphQL errors from ERROR while keeping everything else on CRITICAL:

'sentry' => [
    'log_level' => \Monolog\Level::Critical->value,
    'exception_log_levels' => [
        \GraphQL\Error\Error::class => \Monolog\Level::Error->value,
    ],
],

Expected client errors, like a customer query without a token or an invalid coupon code, are marked client safe by GraphQL and keep using log_level, so they stay out of Sentry. Set graphql_report_client_safe_errors to true to send those as well.

Optional error page configuration

  • Optional you can configure custom error pages in pub/errors. You can use the sentry feedback form and insert here the sentry log ID. The Sentry Log Id is captured in de customer session and can be retrieved in processor.php.

Sending additional data to Sentry when logging errors

  • When calling any function from the Psr\Log\LoggerInterface you can pass any data to the parameter $context and it will be send to Sentry as 'Custom context'.

Change / Filter events

This module has an event called sentry_before_send that is dispatched before setting the config before_send. This provides the means to edit / filter events. You could for example add extra criteria to determine if the exception should be captured to Sentry. To prevent the Exception from being captured you can set the event to null or unset it completly.

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $observer->getEvent()->getSentryEvent()->unsEvent();
}

Example: https://github.com/justbetter/magento2-sentry-filter-events

This same thing is the case for

sentry_before_send https://docs.sentry.io/platforms/php/configuration/options/#before_send
sentry_before_send_transaction https://docs.sentry.io/platforms/php/configuration/options/#before_send_transaction
sentry_before_send_check_in https://docs.sentry.io/platforms/php/configuration/options/#before_send_check_in
sentry_before_breadcrumb https://docs.sentry.io/platforms/php/configuration/options/#before_breadcrumb
sentry_before_send_log https://docs.sentry.io/platforms/php/configuration/options/#before_send_log

The sentry_javascript_context event is dispatched server-side when sentry/issue_grouping/add_action_context is
enabled, before the request context is rendered into the page for the browser SDK. See
Adding your own Javascript context above.

Compatibility

The module is tested on Magento version 2.4.x with sentry sdk version 4.x. feel free to fork this project or make a pull request.

Ideas, bugs or suggestions?

Please create a issue or a pull request.

Contributing

Contributing? Awesome! Thank you for your help improving the module!

Please see CONTRIBUTING for details.

Most importantly:

  • When making a PR please add a description what you've added, and if relevant why.
  • To save time on codestyle feedback, please run
    • composer install
    • composer run codestyle
    • composer run analyse

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.

We’re a innovative development agency from The Netherlands.

Changelog

[5.0.0] - Unreleased

Removed

* **BREAKING:** Removed the LogRocket integration. It has been extracted into its own module, [`justbetter/magento2-sentry-logrocket`](https://github.com/justbetter/magento2-sentry-logrocket). If you were using LogRocket, install that module before upgrading — the config paths and `env.php` key are unchanged, so no configuration changes are needed. If you don't use LogRocket, no action is needed.

[4.5.2] - 2025-11-27

Fixed

* Fixed undefined message properties on queues (https://github.com/justbetter/magento2-sentry/pull/221)
* Fixed error thrown on new setup:install (https://github.com/justbetter/magento2-sentry/pull/223)
* Fixed activating sentry with invalid DSN (https://github.com/justbetter/magento2-sentry/pull/222)

[4.5.1] - 2025-11-11

Added

* Set Magento BP as default prefix

[4.5.0] - 2025-11-04

Added

* Added Logger support (https://github.com/justbetter/magento2-sentry/pull/201)
* Added support for manual release defnition (https://github.com/justbetter/magento2-sentry/pull/204)
* Added custom SDK identifier to module (https://github.com/justbetter/magento2-sentry/pull/208)
* Added Cache instrumentation (https://github.com/justbetter/magento2-sentry/pull/206)
* Added Queue instrumentation (https://github.com/justbetter/magento2-sentry/pull/210)
* add csp report-uri if none is configured (https://github.com/justbetter/magento2-sentry/pull/216) thanks to https://github.com/rommelfreddy 

Changed

* Replaced deprecated \Monolog\Logger::Warning (https://github.com/justbetter/magento2-sentry/pull/214) thanks to https://github.com/GeKVe
* use configured dsn-hostname for csp connect-src policy (https://github.com/justbetter/magento2-sentry/pull/215) thanks to https://github.com/rommelfreddy 

[4.4.0] - 2025-07-14

Fixed

* Catch zend db adapter errors when database is missing (https://github.com/justbetter/magento2-sentry/pull/193)
* Fix logrocket key type

Added

* Add the ability to select job codes using regex (https://github.com/justbetter/magento2-sentry/pull/197)
* Added support for [spotlight](https://spotlightjs.com/) (https://github.com/justbetter/magento2-sentry/pull/195)

[4.3.0] - 2025-06-24

Fixed

* Catch The default website isnt defined when getting store (https://github.com/justbetter/magento2-sentry/pull/188)

Added

* Add sentry logger by hooking into monolog setHandlers (https://github.com/justbetter/magento2-sentry/pull/184)
* Added support for cron check-ins (https://github.com/justbetter/magento2-sentry/pull/182)

[4.2.0] - 2025-06-11

Added

* Add performance sampling by (https://github.com/justbetter/magento2-sentry/pull/178) thanks to https://github.com/indykoning, https://github.com/barryvdh and https://github.com/rommelfreddy
* Automatically pass all supported sentry config (https://github.com/justbetter/magento2-sentry/pull/177)

[4.1.0] - 2025-06-04

Added

* Clean up the Magento stacktrace before sending it to Sentry (https://github.com/justbetter/magento2-sentry/pull/171)
* Pass config also relevant to sentry (https://github.com/justbetter/magento2-sentry/pull/172)

Fixed

* Gather ip from Magento instead of server variable (https://github.com/justbetter/magento2-sentry/pull/174)

[4.0.1] - 2025-05-06

Fixed

* Load customerSession in SentryLog via proxy (Fixing https://github.com/justbetter/magento2-sentry/issues/160) (https://github.com/justbetter/magento2-sentry/pull/169) thanks to https://github.com/brosenberger

[4.0.0] - 2025-04-23

Added

* Moved sentry logging to a monolog handler (https://github.com/justbetter/magento2-sentry/pull/165)
* Added support for Magento 2.4.8
* Added support for Monolog V3

Changed

* Dynamically add sentry and logrocket domains to CSP whitelist (https://github.com/justbetter/magento2-sentry/pull/156) thanks to https://github.com/brosenberger
* Use secureRenderer for including sentry frontend js (https://github.com/justbetter/magento2-sentry/pull/157) thanks to https://github.com/brosenberger

[3.9.0] - 2025-01-31

Added

* Raised PHPStan level to 5 (https://github.com/justbetter/magento2-sentry/pull/149)
* Added user context to logging and errors when possible (https://github.com/justbetter/magento2-sentry/pull/133 & https://github.com/justbetter/magento2-sentry/pull/152)
* Allow overriding some config per store (https://github.com/justbetter/magento2-sentry/pull/155) thanks to https://github.com/bruno-blackbird

[3.8.0] - 2024-08-09

Added

* Added option to exclude default-integrations (https://github.com/justbetter/magento2-sentry/pull/146) thanks to https://github.com/rommelfreddy

Removed

* Removed promise-polyfill (https://github.com/justbetter/magento2-sentry/pull/142) thanks to https://github.com/rommelfreddy

[3.7.2] - 2024-07-04

Fixed

* fix initialisation of replay integration (https://github.com/justbetter/magento2-sentry/pull/143) thanks to https://github.com/rommelfreddy

[3.7.1] - 2024-06-25

Fixed

* Fix CSP after Polyfill changes (https://github.com/justbetter/magento2-sentry/pull/141) thanks to https://github.com/sprankhub

[3.7.0] - 2024-06-25

Fixed

* Replace polyfill CDN with fastly (https://github.com/justbetter/magento2-sentry/pull/140) thanks to https://github.com/barryvdh

Added

* Enable INP when tracing is enabled (https://github.com/justbetter/magento2-sentry/pull/137) thanks to https://github.com/amenk

[3.6.0] - 2024-03-29

This release drops support for php 7.4 as it has been completely EOL for over a year. https://www.php.net/supported-versions.php

Fixed

* Check if Sentry is defined before running init (https://github.com/justbetter/magento2-sentry/pull/129) thanks to https://github.com/netzkollektiv

Changed

* Use property promotions (https://github.com/justbetter/magento2-sentry/pull/130) thanks to https://github.com/cirolosapio
* Raised sentry/sdk version to 4.0+

[3.5.2] - 2024-03-18

Fixed

* Fix start errors without database connection (https://github.com/justbetter/magento2-sentry/pull/125) thanks to https://github.com/fredden

[3.5.1] - 2023-12-21

Fixed

* Fix getting SCOPE_STORES from incorrect ScopeInterface (https://github.com/justbetter/magento2-sentry/pull/123) thanks to https://github.com/peterjaap
* Improve extendibility by changing self to static (https://github.com/justbetter/magento2-sentry/pull/122) thanks to https://github.com/peterjaap

[3.5.0] - 2023-12-20

Added

* Added support for configuration using System Configuration (https://github.com/justbetter/magento2-sentry/pull/121) thanks to https://github.com/ArjenMiedema

[3.4.0] - 2023-06-14

Added

* Added `sentry_before_send` event (https://github.com/justbetter/magento2-sentry/pull/117) thanks to https://github.com/rbnmulder
* Added support to ignore javascript errors (https://github.com/justbetter/magento2-sentry/pull/102) thanks to https://github.com/rommelfreddy

[3.3.1] - 2023-03-15

Fixed

* Fixed PHP 8.2 deprecation errors (https://github.com/justbetter/magento2-sentry/pull/114) thanks to https://github.com/peterjaap

[3.3.0] - 2023-03-01

Added

* Added Session Replay functionality

[3.2.0] - 2022-07-07

Fixed

* Changed addAlert to addRecord for Test error (https://github.com/justbetter/magento2-sentry/pull/98) thanks to https://github.com/peterjaap

Added

* Send context data top Sentry as Custom Data (https://github.com/justbetter/magento2-sentry/pull/97) thanks to https://github.com/oneserv-heuser

[3.1.0] - 2022-06-14

Fixed

* Update addRecord function for Monolog 2.7+ (https://github.com/justbetter/magento2-sentry/pull/92) thanks to https://github.com/torhoehn

[3.0.2] - 2022-06-14

Added

* Added sentry_before_init event to GlobalExceptionCatcher (https://github.com/justbetter/magento2-sentry/pull/90) thanks to https://github.com/peterjaap

[3.0.1] - 2022-05-10

Fixed

* Fix problems with logout during product edit in admin panel when Chrome DevTools is open (https://github.com/justbetter/magento2-sentry/pull/86) thanks to https://github.com/trungpq2711

[3.0.0] - 2022-04-13

Breaking: New version (2.0.0+) for Monolog will be required.

Fixed

* Fixed PHP 8.1 support with monolog 2.0.0+ (https://github.com/justbetter/magento2-sentry/pull/85) thanks to https://github.com/peterjaap

[2.6.1] - 2022-04-13

Changed

* Updated constraints for monolog versions lower than 2.0.0

[2.6.0] - 2021-04-08

Added

* Add option to filter the severity of ErrorExceptions being sent to Sentry
* Add option to ignore specific Exception classes

[2.5.4] - 2021-02-10

Fixed

* Fixed capital in dataHelper (https://github.com/justbetter/magento2-sentry/pull/74) thanks to https://github.com/peterjaap

[2.5.3] - 2021-02-03

Added

* Add option to strip static content version and store code from urls that get sent to Sentry (https://github.com/justbetter/magento2-sentry/pull/73) thanks to https://github.com/peterjaap

[2.5.2] - 2021-01-18

Fixed

* Fix monolog plugin still adding monolog as argument

[2.5.1] - 2021-01-18

Fixed

* Merged PR - Use isset to check for custom_tags in context (https://github.com/justbetter/magento2-sentry/pull/71) thanks to https://github.com/matthiashamacher

[2.5.0] - 2021-01-15

Changed

* Merged PR - Remove monolog class in function, add custom tag functionality (https://github.com/justbetter/magento2-sentry/pull/66) thanks to https://github.com/matthiashamacher
This is a breaking change on SentryLog::send(), the function required monolog before, this has been removed

[2.4.0] - 2020-12-07

Added

* Merged PR - Add csp_whitelist.xml (https://github.com/justbetter/magento2-sentry/pull/65) thanks to https://github.com/matthiashamacher

Changed

* Merged PR - Update Sentry version (https://github.com/justbetter/magento2-sentry/pull/64) thanks to https://github.com/matthiashamacher

[2.3.2] - 2020-11-30

Added

* Merged PR - Adding environment to js integration (https://github.com/justbetter/magento2-sentry/pull/62) thanks to https://github.com/matthiashamacher

[2.3.1] - 2020-07-31

Added

* Merged PR - Add option to enable or disable Php error tracking (https://github.com/justbetter/magento2-sentry/pull/59) thanks to https://github.com/t9toqwerty

[2.3.0] - 2020-06-29

Added

* Merged PR - Added version tagging to JavaScript (https://github.com/justbetter/magento2-sentry/pull/54) thanks to https://github.com/JKetelaar
* Added LogRocket support

Changed

* Better feedback if configuration prevents the module from running

[2.2.3] - 2020-02-25

Fixed

* Merged PR - Release version should be string (https://github.com/justbetter/magento2-sentry/pull/49) thanks to https://github.com/DominicWatts

[2.2.2] - 2020-02-11

Changed

* Merged PR - Change behavior to check of script tag can be used (https://github.com/justbetter/magento2-sentry/pull/48) thanks to https://github.com/adamj88
* Updated changelog format to folow more closely to https://keepachangelog.com/

[2.2.1] - 2019-12-12

Changed

* Merged PR - fix for requirements sdk (https://github.com/justbetter/magento2-sentry/pull/42) thanks to https://github.com/jupiterhs

[2.2.0] - 2019-12-12

Changed

* Merged PR (https://github.com/justbetter/magento2-sentry/pull/37) thanks to https://github.com/DominicWatts
* Merged PR (https://github.com/justbetter/magento2-sentry/pull/38) thanks to https://github.com/matthiashamacher

[2.1.0] - 2019-11-22

Changed

* Merged PR (https://github.com/justbetter/magento2-sentry/pull/33) thanks to https://github.com/DominicWatts
* Merged PR (https://github.com/justbetter/magento2-sentry/pull/35) thanks to https://github.com/peterjaap
* Merged PR (https://github.com/justbetter/magento2-sentry/pull/36) thanks to https://github.com/peterjaap
* Refactor of proxy classes in di.xml

Fixed

* Fixed all PHPcs warnings and errors

[2.0.0] - 2019-11-19

Changed

* Merged PR (https://github.com/justbetter/magento2-sentry/pull/29) thanks to https://github.com/michielgerritsen
* Merged PR (https://github.com/justbetter/magento2-sentry/pull/26) thanks to https://github.com/JosephMaxwell
* Merged PR (https://github.com/justbetter/magento2-sentry/pull/27) thanks to https://github.com/DominicWatts

[0.8.0] - 2019-08-29

Changed

* Merged PR (https://github.com/justbetter/magento2-sentry/pull/24) thanks to https://github.com/kyriog
* Merged PR (https://github.com/justbetter/magento2-sentry/pull/22) thanks to https://github.com/fredden
* Merged PR (https://github.com/justbetter/magento2-sentry/pull/21) thanks to https://github.com/erikhansen

[0.7.2] - 2019-06-19

Changed

* Reverted async attribute

[0.7.1] - 2019-06-19

Added

* Added async and crossorigin attribute to script tags

[0.7.0] - 2019-04-23

Fixed

* Merged pull request avoiding magento crash (https://github.com/justbetter/magento2-sentry/pull/19)

[0.6.2] - 2019-04-05

Fixed

* Fixed issues useing referenceBlock when adding scripts (https://github.com/justbetter/magento2-sentry/issues/18)

[0.6.1] - 2019-02-14

Added

* Added missing files of PR 13 (https://github.com/justbetter/magento2-sentry/pull/16)

[0.6.0] - 2019-02-14

Added

* Added Sentry script tag to catch javascript errors (https://github.com/justbetter/magento2-sentry/pull/13)

[0.5.1] - 2019-02-13

Added

* Support for setting environment (https://github.com/justbetter/magento2-sentry/pull/12)

[0.5.0] - 2018-12-07

Added

* Send extra parameters to sentry (https://github.com/justbetter/magento2-sentry/issues/11)
* Added Magento 2.3.x support & dropped 2.1.x support

Fixed

* Fixed area code not set or already set

[0.4.2] - 2018-10-17

Fixed

* Bugfix with area code already set - removed area code from constructor with causes problems at random cases. (https://github.com/justbetter/magento2-sentry/issues/10)

Changed

* Removed info level - this log level is not useable in sentry.

[0.4.1] - 2018-08-15

Fixed

* Removed plugin in di.xml to prevent fatal crash on storefrontend
* Restored preference in di.xml

[0.4.0] - 2018-08-10

Added

* Added user context
* Added message context
* Added extra magento store parameters

Changed

* Refactor of overwrite to plugin with monolog
* Refactor of ExceptionCatcher to use same SentryLogger
* Refactor a lot of code
* PSR2 compliance

Fixed

* Bugfix area code not set

[0.2.1] - 2018-04-30

Changed

* downgraded requirement monolog for magento 2.1.x

[0.2.0] - 2018-04-30

Added

* Feature request to test sentry in development mode (https://github.com/justbetter/magento2-sentry/issues/4)
* Added mage deploy mode to sentry in context_tags

[0.1.0] - 2018-04-17

Added

* Feature request for sending test events (https://github.com/justbetter/magento2-sentry/issues/3)
* Added ACL roles for editing sentry config

[0.0.6] - 2018-03-25

Fixed

* Bugfix wrong file commit

[0.0.5] - 2018-03-17

Added

* Initial commit module - basic working module
Versions
Version Stability QA Status Compatibility Released
5.0.0 stable Fail Magento 2.4.7-2.4.9 Details 2026-11-03 13:29:22
4.7.0 stable Not tested Not yet tested Details 2026-11-03 13:18:29
4.6.0 stable Fail Magento 2.4.7-2.4.9 Details 2026-05-13 15:12:16
4.5.5 stable Fail Not yet tested Details 2026-01-27 09:40:40
4.5.4 stable Not tested Not yet tested Details 2026-01-26 15:34:03
4.5.3 stable Not tested Not yet tested Details 2026-01-05 09:23:34
4.5.2 stable Not tested Not yet tested Details 2025-11-27 14:13:35
4.5.1 stable Not tested Not yet tested Details 2025-11-11 10:51:14
4.5.0 stable Not tested Not yet tested Details 2025-11-04 15:20:49
4.4.0 stable Not tested Not yet tested Details 2025-07-14 08:42:00
4.3.0 stable Not tested Not yet tested Details 2025-06-24 11:42:39
4.2.0 stable Not tested Not yet tested Details 2025-06-11 09:03:35
4.1.0 stable Not tested Not yet tested Details 2025-06-04 12:25:27
4.0.1 stable Not tested Not yet tested Details 2025-05-06 08:57:57
4.0.0 stable Not tested Not yet tested Details 2025-04-23 11:38:10
3.9.0 stable Not tested Not yet tested Details 2025-01-31 08:55:30
3.8.0 stable Not tested Not yet tested Details 2024-08-09 09:13:29
3.7.2 stable Not tested Not yet tested Details 2024-07-04 11:17:26
3.7.1 stable Not tested Not yet tested Details 2024-06-25 10:48:26
3.7.0 stable Not tested Not yet tested Details 2024-06-25 10:03:50
3.6.0 stable Not tested Not yet tested Details 2024-03-29 09:12:01
3.5.2 stable Not tested Not yet tested Details 2024-03-18 12:51:37
3.5.1 stable Not tested Not yet tested Details 2023-12-21 15:03:02
3.5.0 stable Not tested Not yet tested Details 2023-12-20 11:57:46
3.4.0 stable Not tested Not yet tested Details 2023-06-14 15:24:52
3.3.1 stable Not tested Not yet tested Details 2023-03-15 15:22:14
3.3.0 stable Not tested Not yet tested Details 2023-03-01 10:10:31
3.2.0 stable Not tested Not yet tested Details 2022-07-07 09:42:00
3.1.0 stable Not tested Not yet tested Details 2022-06-14 14:52:16
3.0.2 stable Not tested Not yet tested Details 2022-06-14 14:47:03
3.0.1 stable Not tested Not yet tested Details 2022-05-10 12:50:00
3.0.0 stable Not tested Not yet tested Details 2022-04-13 12:41:34
2.6.1 stable Not tested Not yet tested Details 2022-04-13 12:03:13
2.6.0 stable Not tested Not yet tested Details 2021-04-08 09:19:00
2.5.4 stable Not tested Not yet tested Details 2021-02-10 11:11:20
2.5.3 stable Not tested Not yet tested Details 2021-02-03 12:56:28
2.5.2 stable Not tested Not yet tested Details 2021-01-18 08:42:23
2.5.1 stable Not tested Not yet tested Details 2021-01-18 08:37:52
2.5.0 stable Not tested Not yet tested Details 2021-01-15 08:46:31
2.4.0 stable Not tested Not yet tested Details 2020-12-07 08:38:26
2.3.2 stable Not tested Not yet tested Details 2020-11-30 10:47:09
2.3.1 stable Not tested Not yet tested Details 2020-08-31 11:44:23
2.3.0 stable Not tested Not yet tested Details 2020-06-29 09:07:35
2.2.3 stable Not tested Not yet tested Details 2020-02-25 15:18:16
2.2.2 stable Not tested Not yet tested Details 2020-02-11 14:44:41
2.2.1 stable Not tested Not yet tested Details 2019-12-12 10:10:41
2.2.0 stable Not tested Not yet tested Details 2019-12-12 10:06:14
2.1.0 stable Not tested Not yet tested Details 2019-11-22 13:54:34
2.0.0 stable Not tested Not yet tested Details 2019-11-19 10:18:24
0.8.0 stable Not tested Not yet tested Details 2019-08-29 14:26:59
0.7.2 stable Not tested Not yet tested Details 2019-06-20 07:21:16
0.7.1 stable Not tested Not yet tested Details 2019-06-19 15:05:11
0.7.0 stable Not tested Not yet tested Details 2019-04-23 09:35:50
0.6.2 stable Not tested Not yet tested Details 2019-04-05 08:15:44
0.6.1 stable Not tested Not yet tested Details 2019-02-15 12:50:10
0.6.0 stable Not tested Not yet tested Details 2019-02-14 09:05:04
0.5.1 stable Not tested Not yet tested Details 2019-02-13 09:06:55
0.5.0 stable Not tested Not yet tested Details 2018-12-07 12:00:21
0.4.2 stable Not tested Not yet tested Details 2018-10-17 12:15:31
0.4.1 stable Not tested Not yet tested Details 2018-08-15 08:50:57
0.4.0 stable Not tested Not yet tested Details 2018-08-10 15:36:28
0.3.0 stable Not tested Not yet tested Details 2018-07-06 07:41:31
0.2.2 stable Not tested Not yet tested Details 2018-05-01 18:50:58
0.2.1 stable Not tested Not yet tested Details 2018-04-30 20:49:12
0.2.0 stable Not tested Not yet tested Details 2018-04-30 10:11:56
0.1.0 stable Not tested Not yet tested Details 2018-04-17 14:36:06
0.0.6 stable Not tested Not yet tested Details 2018-03-23 08:22:19
0.0.5 stable Not tested Not yet tested Details 2018-03-07 15:29:01

Requires 10

Package Constraint
justbetter/magento2-core ^1.0
magento/framework >=103.0.7
magento/framework-message-queue *
magento/module-config >=101.2
magento/module-csp *
magento/module-message-queue *
monolog/monolog >=2.7.0|^3.0
nyholm/psr7 ^1.2
php >=8.1
sentry/sentry ^4.13

Requires-dev 6

Package Constraint
bitexpert/phpstan-magento ^0.42.0
justbetter/magento2-coding-standard ^1.0,>=1.0.2
magento/magento-coding-standard >=40
phpcompatibility/php-compatibility *
phpunit/phpunit *
rector/rector >=1.2.5

Suggests 1

Package Reason
justbetter/magento2-sentry-logrocket Links Sentry sessions to your Logrocket replays

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Warning 36 36 warnings (ruleset: Magento2)
PHPMD Warning 34 34 rule violations (UnusedFormalParameter:15, IfStatementAssignment:5, MissingImport:4, TooManyPublicMethods:3, ErrorControlOperator:2)
Cpd Pass 0
Composer validate Info 6 valid; 6 advisory notes (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Error Error
2.4.8 6 6
2.4.9 6 6

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
MIT
Authors

More from justbetter

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.