Sentry Integration for Magento 2

Kowal_Sentry is a production-ready module for Magento 2 that integrates your store with the Sentry platform and provides advanced monitoring of errors, performance, and key business processes.
Compatibility
2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
€30.75
per item
Email to a Friend

Enquire about this product

Description / Sentry Integration for Magento 2

MAGENTO 2 · ERRORS · PERFORMANCE · CHECKOUT

See Magento errors together with the context in which they occurred.

Kowal Sentry

Connect PHP and JavaScript monitoring with tracing, checkout breadcrumbs, and observation of crons and commands. Link events to the environment and release to help your team diagnose the store more easily.

Backend and frontend · Cron and CLI · Release tracking

HOW IT WORKS IN PRACTICE

01 · Connect your store to the project
You set the DSN, environment, and scope of collected events.

02 · Collect error context
Traces, breadcrumbs, and logs help reconstruct the flow.

03 · Analyze in Sentry
You compare events, releases, and processes that need improvement.

What does your store gain?

Explore the module’s features, use cases, and settings.

Magento 2 and Sentry in one consistent implementation

In an e-commerce environment, fast error detection and root-cause analysis have a direct impact on sales, customer service quality, and store stability. Kowal_Sentry has been prepared as a Magento 2 module that lets you connect your store to Sentry without modifying core files, while maintaining compliance with the platform architecture.

The module supports monitoring of the most important areas of store operation:

  • PHP backend errors,
  • JavaScript errors on the storefront and in the admin panel,
  • HTTP and AJAX request tracing,
  • checkout monitoring and the order placement process,
  • cron monitoring and check-ins to Sentry,
  • CLI command monitoring,
  • release tracking,
  • source maps for the frontend,
  • structured logs,
  • Session Replay and User Feedback within a controlled scope.

As a result, the technical team gets a single observation point for the entire Magento 2 application.

Faster error detection in Magento 2

Kowal_Sentry captures backend and frontend errors, so issues can be reported after they occur according to the configuration and transport availability. This applies to PHP exceptions as well as JavaScript errors, RequireJS issues, unhandled promise rejections, and checkout-related errors.

Better store performance analysis

The module supports performance tracing for requests, AJAX calls, crons, and CLI commands. This helps detect slow processes, performance regressions, and overload points in key areas of the Magento 2 store.

Checkout and sales process monitoring

For online stores, the areas that directly affect conversion matter most. Kowal_Sentry supports monitoring of checkout, payment selection, delivery, place order, and order-related processes. This is especially important when diagnosing problems with the cart, payments, and purchase completion.

Cron monitoring and observability of technical processes

Many important Magento 2 processes run in the background via cron. The module lets you monitor job startup, execution time, success or error status, and report check-ins to Sentry. This gives you better control over store synchronizations, imports, exports, and automations.

Secure integration with Magento data

The module has been prepared with data protection in mind. It supports customer data masking, blocking cookies and authorization headers, query params redaction, limiting POST body, and additional sanitization rules for checkout and payment fields.

PHP backend monitoring

The extension supports full PHP SDK initialization for:

  • storefront HTTP,
  • adminhtml,
  • REST and GraphQL,
  • cron,
  • CLI,
  • custom endpoints and integrations.

This makes it possible to report exceptions, fatal errors, manual messages, and additional technical or business context.

JavaScript frontend monitoring

On the browser side, the module integrates Magento 2 with the Sentry Browser SDK and supports:

  • window.onerror,
  • unhandledrejection,
  • RequireJS errors,
  • breadcrumbs for AJAX,
  • load and interaction tracing,
  • checkout instrumentation,
  • Session Replay,
  • User Feedback widget.

This solution works well both in a classic Magento storefront and in stores with a larger number of custom scripts and widgets.

Magento 2 checkout monitoring

Checkout is one of the most critical areas of a store. Kowal_Sentry enables:

  • tracking checkout steps,
  • tagging payment and shipping methods,
  • breadcrumbs for AJAX errors in checkout,
  • reporting exceptions related to place order,
  • better analysis of issues affecting conversion.

Cron and CLI monitoring

Thanks to integration with background processes, the module helps analyze issues that are not always visible on the storefront:

  • importer errors,
  • failed integration synchronizations,
  • long cron execution times,
  • bin/magento command errors,
  • unstable tasks executed asynchronously.

Why this Magento 2 module for Sentry is production-ready

Kowal_Sentry is not a simple wrapper for sending exceptions. It is a well-designed integration layer built according to Magento 2 best practices.

The module:

  • does not modify core files,
  • uses dependency injection, plugins, observers, and layout XML,
  • supports configuration from the admin panel,
  • works in local, dev, staging, and production environments,
  • supports multistore,
  • lets you control backend and frontend independently,
  • takes privacy policy and data sanitization into account,
  • supports release strategy and preparation for source maps.

This is important for teams looking for a solution suitable for real implementation, not only for developer testing.

Error Monitoring for Magento 2

The module can report:

  • unhandled exceptions,
  • fatal errors,
  • JavaScript errors,
  • AJAX errors,
  • manual captureException and captureMessage,
  • events related to checkout and orders.

Magento 2 Performance Monitoring

Kowal_Sentry supports:

  • backend request tracing,
  • frontend request tracing,
  • spans for HTTP calls and integrations,
  • cron execution time monitoring,
  • CLI command monitoring,
  • correlation of performance with release and environment.

Structured Logs and observability

The module provides a facade for structured logs, so Sentry can serve not only as an error repository, but also as a central correlation point for logs, traces, and exception events.

Session Replay and User Feedback

For the frontend, the solution supports a careful implementation of Session Replay with data masking and a feedback widget for the end user. This makes it possible to better understand errors that occur in real user sessions.

Data security and privacy

Monitoring implementations in e-commerce must account for the protection of personal and operational data. Kowal_Sentry has been prepared with secure default configuration in mind.

By default, the module supports:

  • customer data masking,
  • blocking Authorization headers,
  • blocking cookies,
  • removing POST body,
  • query params redaction,
  • checkout field masking,
  • payment-related field masking,
  • control over the scope of data sent to Replay.

This allows the Sentry integration to be implemented in a more responsible way and in line with organizational requirements.

Who the Kowal_Sentry module is for

This solution is designed for:

  • production Magento 2 stores,
  • software houses maintaining Magento stores,
  • DevOps teams and backend/frontend developers,
  • companies implementing observability in e-commerce,
  • organizations that need better control over checkout, integration, and performance errors.

The module works well both in a single store and in multistore installations with more complex business processes.

Summary

Kowal_Sentry is an advanced Magento 2 module for Sentry integration that combines error tracking, performance monitoring, cron monitoring, checkout observability, and secure data sanitization. It is a solution for companies that want to increase store stability, diagnose issues faster, and better control the quality of Magento 2 operation in a production environment.

If you are looking for a Magento 2 Sentry integration, Magento 2 error monitoring, Magento performance monitoring, or Magento 2 checkout monitoring module, Kowal_Sentry is a solution designed specifically for this scenario.

DSN configuration and monitoring scope

Stores → Configuration → Kowal → Sentry lets you control backend and frontend independently. Provide only the DSN URL of the appropriate project, then select the environment, release, and sampling.

The module’s main switch is disabled by default. Replay and the feedback widget also require separate activation; the availability of their operation depends on the SDK used and the Sentry configuration.

Releases and source maps in the deployment process

Release strategy supports manual, env, file, and generated. The module recognizes, among others, KOWAL_SENTRY_RELEASE, SENTRY_RELEASE, RELEASE_NAME, and GIT_COMMIT.

You upload source maps in CI/CD, for example with sentry-cli. The module does not upload them during normal Magento operation. Keep release, dist, and asset paths consistent to read the correct error stacks.

Data masking and control

Default rules redact authorization headers, cookies, POST body, and selected parameters. User identifiers can be hashed, and checkout and payment selectors can be masked or blocked in Replay.

Check a sample of events for your custom fields and integrations; pattern-based sanitization does not guarantee removal of every piece of confidential information. The scope of visible events also depends on sampling and transport availability.

Tracing, logs, and metrics are different features

HTTP, CLI, and cron transactions as well as structured logs help correlate errors with processes. The captureMetric facade is available, but the repository indicates a limitation of backend metrics in the SDK integration used; it should not be treated as a full measurement system.

After enabling Enable Test Commands, you can use the kowal:sentry:test:error, :transaction, :checkin, and :log commands for controlled verification on your instance.

Installation via Composer

Package kowal/module-sentry, module Kowal_Sentry. After configuring access to the Kowal repository, install the package, enable the module, update Magento, and clear the cache. In production, include compilation and static content deployment according to the store’s process.

From configuration to results

1. Connect your store to the project
You set the DSN, environment, and scope of collected events.

2. Collect error context
Traces, breadcrumbs, and logs help reconstruct the flow.

3. Analyze in Sentry
You compare events, releases, and processes that need improvement.

Error during order placement

A customer encounters a problem in checkout. The event may include breadcrumbs, the payment or delivery method, and release information.

The team uses this context to determine the cause. The level of detail depends on the configuration, sampling, and integration of the specific checkout.

Connect monitoring with your store maintenance process

Want to adapt the module to your store? Ask about a Kowal Sentry implementation and discuss the configuration or required extensions.

More Information

Theme compatibility Luma / Blank, KOWAL

Questions and Answers

Which Magento 2.4.x versions work with the Sentry integration?

Yes, the module was designed for Magento Open Source and Adobe Commerce 2.4.x.

Can separate Sentry projects be used for the backend and frontend?

Yes. The module supports separate Backend DSN and Frontend DSN, but you can also use a single DSN if needed.

Does the module support multistore?

Yes, the configuration is prepared for the Magento scope and supports multistore environments.

Is the module secure in terms of customer data?

Yes, the module was designed with an emphasis on data sanitization and control over the scope of information sent to Sentry.

Does the module require modifications to the Magento core?

No. The integration is based on standard Magento 2 mechanisms, such as plugins, observers, DI, and layout XML.

Change Log

Initial release. Magento 2 Sentry integration for production use: PHP and JavaScript error monitoring, performance tracing, checkout instrumentation, cron and CLI monitoring, release tracking, source map readiness, structured logs, and privacy-first data sanitization.

Module Installation Instructions

Kowal_Sentry: installation and configuration guide

Module purpose

Kowal_Sentry integrates Magento 2 with Sentry and lets you monitor:

  • PHP backend errors,
  • JavaScript errors on the storefront and optionally in the admin panel,
  • HTTP, CLI, and cron transactions,
  • checkout breadcrumbs,
  • Session Replay,
  • User Feedback,
  • release tracking and preparation for source maps.

The module has been prepared as a Composer package and should run from the vendor/kowal/module-sentry location.

Requirements

  • Magento Open Source / Adobe Commerce 2.4.x
  • PHP 8.1+
  • access to Sentry and at least one project
  • customer email address and license token for the Kowal Composer repository

Installation

The following commands have been copied from README.md.

You will receive the access credentials for the Composer repository, customer email address and license token, by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace TWOJ_EMAIL_KLIENTA with the email address of your account and TWOJ_TOKEN with the token you received. Run the commands in the Magento root directory.

composer config repositories.kowal composer https://repo.kowal.store
composer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'
composer require kowal/module-sentry
bin/magento module:enable Kowal_Sentry
bin/magento setup:upgrade
bin/magento cache:flush

Important

  • The Composer package is intended to run only from vendor/kowal/module-sentry.
  • You should not keep the same module in app/code/Kowal/Sentry at the same time.
  • After installation, you will find the configuration under:

Stores -> Configuration -> Kowal -> Sentry

Quick start

Minimum configuration required to start the module:

  1. Set Enable Module = Yes.
  2. Set Environment, for example production or staging.
  3. Enable Enable Backend Monitoring and paste Backend DSN.
  4. If you want to monitor the frontend, enable Enable Frontend Monitoring and paste Frontend DSN.
  5. Save the configuration and clear the cache if required in the given environment.

Where to get data from Sentry

DSN

You can usually find the DSN here:

Settings -> Projects -> [projekt] -> Client Keys (DSN)

In the Backend DSN and Frontend DSN fields, paste only the DSN URL itself, for example:

https://examplePublicKey@o0000000000000000.ingest.de.sentry.io/0000000000000000

Do not paste the entire snippet:

\Sentry\init([ 'dsn' => 'https://examplePublicKey@o0000000000000000.ingest.de.sentry.io/0000000000000000',]);

Organization

The organization slug is easiest to read from the Sentry panel URL, for example:

https://sentry.io/settings/acme/projects/shop-frontend/

In this example:

  • acme is the Organization
  • shop-frontend is the Project Slug

Project Slug

You can read it:

  • from the project URL in the Sentry panel,
  • or from Settings -> Projects -> [projekt] -> Details

Auth token for source maps

If you use sentry-cli, it is best to keep the token outside Magento, for example in an environment variable:

SENTRY_AUTH_TOKEN

Creating a token:

  • Settings -> Custom Integrations
  • or User Settings -> Personal Tokens

Verification after installation

After basic configuration, you can check whether the module is active and whether the SDK works. The smoke-test commands below have been copied from README.md.

After enabling Enable Test Commands:

bin/magento kowal:sentry:test:error
bin/magento kowal:sentry:test:transaction
bin/magento kowal:sentry:test:checkin
bin/magento kowal:sentry:test:log

Configuration in the Magento panel

Path:

Stores -> Configuration -> Kowal -> Sentry

Below is a description of each section, capabilities, and setting variants.

General section

This section controls module activation, environment, and how release is calculated.

Enable Module

  • Yes: starts the module globally.
  • No: backend and frontend will not be initialized, even if other options are enabled.

Recommendation:

  • Yes in the environment where you want to send data to Sentry.

Environment

Examples:

  • production
  • staging
  • development

Variants:

  • one shared name for the entire instance,
  • different values per website/store view if you need to separate events.

Recommendation:

  • no spaces and no slashes,
  • keep consistent naming across backend, frontend, and CI/CD.

Release Strategy

Available variants:

  • manual: release is taken from the Release Name Override field
  • env: release is retrieved from environment variables
  • file: release is read from a file
  • generated: release is assembled automatically by the module

When to use:

  • manual: when you want to enter the release manually, usually as a fallback or for simple deployments
  • env: best for CI/CD, when the release is passed through deployment
  • file: useful when deployment writes the version identifier to a shared file
  • generated: good to start with if you do not yet have a mature release pipeline

Supported environment variables:

  • KOWAL_SENTRY_RELEASE
  • SENTRY_RELEASE
  • RELEASE_NAME
  • GIT_COMMIT

Release Name Override

Used only with the manual strategy.

Example:

magento-store@2.4.7-p1+20260410.1

Recommendation:

  • the exact same value should be used when uploading source maps.

Project Name

Auxiliary project name in module contexts. This is not the Project Slug from Sentry.

Variants:

  • store instance name,
  • store group name,
  • internal project name.

Debug Mode

  • Yes: more verbose diagnostic logging
  • No: production mode

Recommendation:

  • No in production,
  • Yes temporarily when diagnosing configuration.

Enable Test Commands

  • Yes: makes bin/magento test commands available
  • No: hides them during normal operation

Recommendation:

  • Yes on staging or during testing,
  • No in permanent production configuration.

Backend SDK section

Applies to the PHP SDK used by storefront HTTP, admin, API, cron, and CLI.

Enable Backend Monitoring

  • Yes: enables backend monitoring
  • No: backend does not send errors and traces to Sentry

Backend DSN

This is the primary DSN for the PHP SDK.

Variants:

  • separate Sentry project for the backend only
  • the same project for backend and frontend

Recommendation:

  • in more mature implementations, keep separate backend and frontend projects,
  • in smaller installations, you can start with one shared project.

Error Sample Rate

Range: 0-1

Examples:

  • 1: send all errors
  • 0.5: send about half
  • 0.25: send about 25%

Recommendation:

  • usually 1.0 for errors, at least at the beginning.

Trace Sample Rate

Range: 0-1

Examples:

  • 0.05: low sampling, good for production with high traffic
  • 0.1: reasonable starting point
  • 0.2: more data at the cost of volume

Recommendation:

  • in production, usually 0.05-0.2, depending on traffic and the Sentry plan.

Profile Sample Rate

Range: 0-1

Variants:

  • 0: profiling disabled
  • low value, for example 0.01: periodic performance diagnostics

Recommendation:

  • 0 or a very low value in production.

Enable Logs

  • Yes: sends structured logs
  • No: no logs in Sentry

When to enable:

  • when you want to correlate logs with traces and errors.

Enable Metrics API

  • Yes: enables the module facade for metrics
  • No: metrics on the module side will not be active

Note:

  • the current sentry/sentry 4.24.x treats backend metrics as a deprecated / no-op API.

Enable Cron Monitoring

  • Yes: sends cron check-ins and transactions
  • No: crons will not be monitored by Sentry

You can find the data in Sentry in the section:

  • Crons
  • Monitors

Enable CLI Monitoring

  • Yes: monitors bin/magento commands
  • No: no CLI process monitoring

Useful for:

  • imports,
  • reindexing,
  • custom integration commands.

Enable Adminhtml Monitoring

  • Yes: monitors admin panel requests
  • No: limits backend to storefront, API, cron, and CLI

Enable API Monitoring

  • Yes: monitors REST, GraphQL, and other endpoints
  • No: excludes the integration part from monitoring

Frontend SDK section

Applies to the Browser SDK loaded on the storefront and optionally in the admin panel.

Enable Frontend Monitoring

  • Yes: loads the Browser SDK
  • No: frontend does not send data to Sentry

Frontend DSN

Variants:

  • separate frontend project
  • the same DSN as the backend
  • empty field so the module can try to fall back to Backend DSN

Recommendation:

  • ultimately, use a separate frontend project if you want clear Issues, Replay, and Performance.

Enable Storefront JS

  • Yes: Browser SDK runs on the storefront
  • No: no SDK on the public part of the store

Enable Admin JS

  • Yes: Browser SDK also runs in the admin panel
  • No: JS monitoring is limited to the storefront

Recommendation:

  • enable only when you are actually diagnosing JS issues in the admin panel.

JS Trace Sample Rate

Range: 0-1

Examples:

  • 0.01: very cautious
  • 0.05: good start for production
  • 0.1: more data, higher volume

JS Replay Session Sample Rate

Range: 0-1

Examples:

  • 0: no full replays
  • 0.01: safe start
  • 0.05: more data for UX and error analysis

JS Replay On Error Sample Rate

Range: 0-1

Examples:

  • 1: replay after every error in a session
  • 0.5: replay after some errors

Recommendation:

  • often a better start than high sampling of all sessions.

Enable Session Replay

  • Yes: enables Replay
  • No: no session recording

Recommendation:

  • enable together with strong checkout and payment masking.

Enable User Feedback Widget

  • Yes: the Feedback widget is available
  • No: the widget is not loaded

Note:

  • depending on the Sentry plan and account, the feature may be marked as beta / experimental.

Enable Checkout Instrumentation

  • Yes: adds checkout breadcrumbs and tags
  • No: no additional checkout context

Recommendation:

  • it is usually worth leaving enabled.

Enable Ajax Instrumentation

  • Yes: breadcrumbs for AJAX / fetch / XHR
  • No: less context for frontend issues

Browser SDK CDN URL

By default, it points to the official Sentry bundle.

Variants:

  • default module URL
  • custom CDN mirror
  • pinned specific bundle / specific version

Change only when:

  • you pin the SDK version,
  • you have custom CSP rules,
  • you use asset mirroring.

Privacy / Security section

This section is responsible for minimizing the risk of sending sensitive data.

Send Default PII

  • Yes: the SDK may send the default set of user and request data
  • No: more conservative privacy policy

Recommendation:

  • usually No.

Anonymize IP

  • Yes: do not send the full IP
  • No: leave the standard behavior

Recommendation:

  • usually Yes.

Mask Customer Data

  • Yes: masks customer data
  • No: less data protection

Recommendation:

  • almost always Yes in production.

Mask Checkout Fields

  • Yes: masks checkout fields
  • No: risk of checkout data leakage

Recommendation:

  • always Yes.

Mask Payment Fields

  • Yes: masks payment-related fields
  • No: very risky

Recommendation:

  • always Yes.

Block Authorization Headers

  • Yes: removes or masks Authorization and tokens
  • No: risk of sending authentication data

Recommendation:

  • always Yes.

Block Cookies

  • Yes: removes cookies from event data
  • No: higher risk of session data leakage

Recommendation:

  • usually Yes.

Block POST Bodies

  • Yes: removes POST bodies
  • No: sends more request data

Recommendation:

  • usually Yes, especially for checkout, login, and forms.

Redact Query Params

  • Yes: masks query string parameters
  • No: query string remains more readable, but less secure

Additional Redacted Keys

Text field for additional keys to redact.

Examples:

  • token
  • api_key
  • customer_email
  • external_customer_id

You can separate them with:

  • commas,
  • spaces,
  • new lines.

Replay Mask Selectors

CSS selectors whose content should be masked in Replay.

Examples:

  • .customer-email
  • .field[name*='password']
  • .payment-method

Replay Block Selectors

CSS selectors that should be completely blocked in Replay.

Examples:

  • .checkout-container
  • .payment-method iframe
  • .opc-wrapper

Allowed Domains for Replay Network Details

List of domains for which Replay may include network request details.

Examples:

  • store.example.com
  • api.example.com
  • trusted-partner.example

Recommendation:

  • enter only your own and trusted domains.

Filtering section

This section limits noise and event volume.

Ignore Exceptions Regex

One regex rule per line.

Example use cases:

  • known, harmless technical errors,
  • exceptions from external integrations that are already handled differently.

Ignore URLs Regex

One regex rule per line.

Examples:

  • health-check endpoints,
  • test webhooks,
  • technical assets.

Ignore Transactions

One transaction name per line.

Recommendation:

  • first collect data,
  • then filter out low-value and repetitive transactions.

Ignore Bots

  • Yes: cuts off bot and crawler traffic
  • No: you also monitor automated traffic

Recommendation:

  • Yes with high SEO traffic.

Ignore Health Checks

  • Yes: skips /health, /status, /ping, and similar requests
  • No: such requests are sent to Sentry

Ignore Admin Routes

  • Yes: limits events from the admin
  • No: admin remains monitored

Ignore Static Resource Errors

  • Yes: filters some asset errors for .js and .css
  • No: all errors of this type remain visible

Recommendation:

  • usually Yes if you do not want to fill the project with noise after deployments.

Context section

Controls the amount of business context added to events.

Attach Store Context

  • Yes: attaches store_id, store_code, store name, and currency
  • No: no such context

Recommendation:

  • Yes, especially with multistore.

Attach Website Context

  • Yes: attaches website data
  • No: no identification at this level

Attach Customer Context

  • Yes: attaches anonymized customer context
  • No: no customer status data

Attach Quote Context

  • Yes: attaches cart / quote context
  • No: less data for checkout diagnostics

Attach Cart Totals

  • Yes: attaches cart totals
  • No: lighter event

Recommendation:

  • enable only when this data genuinely helps with analysis.

Attach Order Context

  • Yes: attaches order context
  • No: no data about order flow

Especially useful for:

  • invoice,
  • shipment,
  • transactional emails,
  • ERP / OMS integrations.

Attach Product Context

  • Yes: attaches basic product context
  • No: no such context

Attach Category Context

  • Yes: attaches basic category context
  • No: no such context

Attach Payment / Shipping Method

  • Yes: attaches payment_method and shipping_method
  • No: less data for checkout

Recommendation:

  • this is one of the more valuable diagnostic settings.

Attach Module Version

  • Yes: attaches the Kowal_Sentry version
  • No: without this information in events

Attach Magento Version

  • Yes: attaches the Magento version
  • No: no platform context

Attach Deployment Metadata

  • Yes: attaches additional deployment data if available
  • No: no such metadata

Useful when you want to quickly link a problem to a rollout or a specific build.

Source Maps / Release section

This section organizes parameters needed for release and source maps. The upload itself should take place in CI/CD, not during Magento runtime.

Enable Source Map Upload

  • Yes: confirms that you organizationally use source maps
  • No: the module does not assume source maps in configuration

Note:

  • this is a configuration flag, not an upload mechanism.

Source Map Upload Mode

Variants:

  • manual: manual sentry-cli commands
  • ci: upload in a CI/CD pipeline
  • deploy_hook: upload in a deployment hook

Recommendation:

  • in production, most often ci.

Assets Base URL

Example:

https://store.example.com/static/frontend

This value must match what the Browser SDK sees in the stack trace. Otherwise, source maps will not be matched.

Release Dist

Optional dist for the release.

Examples:

  • storefront
  • admin
  • pl-store

Use it when one release has several asset variants.

Organization

Organization slug used by sentry-cli and the API.

How to find it:

  • from the Sentry panel URL,
  • for example https://sentry.io/settings/acme/projects/shop-frontend/ -> acme

Project Slug

Project slug used by the release and source maps workflow.

How to find it:

  • from the project URL,
  • or Settings -> Projects -> [projekt] -> Details

Release File Path

Path to the file with the release name when using the file strategy.

Examples:

  • /var/www/shared/release.txt
  • pub/media/deploy/release-id.txt

User Feedback section

Configuration of the browser-side issue reporting widget.

Widget Theme

Variants:

  • light
  • dark
  • system

Recommendation:

  • usually system.

Widget Language

Examples:

  • pl-PL
  • en-US

Recommendation:

  • in multistore, match it to the store view locale.

Auto-open after selected errors

  • Yes: after selected frontend errors, a feedback prompt may appear
  • No: the widget does not open automatically

Recommendation:

  • use carefully so as not to be too aggressive for the user.

Show on checkout success

  • Yes: the Feedback trigger may appear on the order success page
  • No: no trigger in this place

Show on contact page

  • Yes: trigger or widget on the contact page
  • No: no exposure on the contact page
  • Yes: permanently visible trigger in the footer or as a permanent page element
  • No: no permanent trigger

This is the simplest option if you want to have a Zglos problem button.

Custom Trigger Selector

CSS selector of an existing element that opens Feedback.

Examples:

  • #report-issue
  • .js-sentry-feedback

Use this field if you want to attach the widget to your own button in the layout or CMS block.

Cron Monitoring section

This section controls check-ins and monitors for Magento crons.

Enable auto-registration of configured cron jobs

  • Yes: the first check-in may create or update a monitor in Sentry
  • No: the module sends check-ins without monitor auto-configuration

Recommendation:

  • Yes if you have controlled deployment and consciously defined jobs.

Monitored job codes

List of Magento job_code.

You can separate them with:

  • commas,
  • spaces,
  • new lines.

Variants:

  • empty field: monitor all crons
  • list of selected job_code: monitor only critical jobs

Examples:

  • sales_clean_quotes
  • catalog_product_alert
  • indexer_reindex_all_invalid

Timeout threshold per job

One rule per line:

job_code:minutes

Example:

catalog_product_alert:10

Use when a cron is sometimes executed irregularly and you want to reduce false alerts.

Max runtime per job

One rule per line:

job_code:minutes

Example:

indexer_reindex_all_invalid:30

After the limit is exceeded, Sentry may mark the monitor as problematic.

Check-in slug prefix

Example:

magento-

Useful when one Sentry organization monitors multiple Magento instances and you want to avoid name collisions.

Recommended configuration profiles

Safe production start

  • Enable Module = Yes
  • Enable Backend Monitoring = Yes
  • Enable Frontend Monitoring = Yes
  • Error Sample Rate = 1
  • Trace Sample Rate = 0.05 or 0.1
  • JS Trace Sample Rate = 0.01 or 0.05
  • Enable Session Replay = Yes
  • JS Replay Session Sample Rate = 0.01
  • JS Replay On Error Sample Rate = 1
  • Send Default PII = No
  • Anonymize IP = Yes
  • Mask Customer Data = Yes
  • Mask Checkout Fields = Yes
  • Mask Payment Fields = Yes
  • Block Authorization Headers = Yes
  • Block Cookies = Yes
  • Block POST Bodies = Yes
  • Redact Query Params = Yes
  • Ignore Bots = Yes
  • Ignore Health Checks = Yes

Diagnostic profile for staging

  • higher Trace Sample Rate, for example 0.2
  • higher JS Trace Sample Rate, for example 0.1
  • temporarily Debug Mode = Yes
  • Enable Test Commands = Yes
  • be careful with Replay: still maintain masking and blocks

Minimal backend-only variant

  • Enable Backend Monitoring = Yes
  • Backend DSN completed
  • Enable Frontend Monitoring = No

This is a good first step if you want to first launch exception and cron monitoring on the PHP side.

Most common configuration errors

  • Pasting the entire \Sentry\init(...) snippet instead of only the DSN.
  • Having the module present in both vendor/ and app/code/ at the same time.
  • Different release values between events and source maps.
  • Overly aggressive Replay sampling in production.
  • Disabling checkout and payment masking.
  • Leaving an example DSN in the active configuration.

Summary

The safest approach is to start with backend monitoring, cautious frontend monitoring, and restrictive privacy settings. Once the data in Sentry becomes stable and readable, you can gradually increase trace sampling, Replay, and the scope of business context.

Press to skip carousel

We found other products you might like!

Write Your Own Review
You're reviewing: Sentry Integration for Magento 2
Your Rating:
Price
Quality
Support
loader
Loading...

You submitted your review for moderation.

Related Posts

Why Does Magento Checkout Show a White Screen with Large Carts (and How to Fix It)?

Why Does Magento Checkout Show a White Screen with Large Carts (and How to Fix It)?

2 min read 10 views
Imagine a customer who adds dozens of products to the cart… goes to checkout… and instead of the checkout page, sees a white screen. Sound familiar? In Magento 2.4.x, this is not an uncommon issue – and we have just dealt with it on a live project.
Read more
Update cookie preferences