Sentry Integration for Magento 2
- 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
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/magentocommand 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
captureExceptionandcaptureMessage, - 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
Can separate Sentry projects be used for the backend and frontend?
Does the module support multistore?
Is the module secure in terms of customer data?
Does the module require modifications to the Magento core?
Change Log
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:flushImportant
- The Composer package is intended to run only from
vendor/kowal/module-sentry. - You should not keep the same module in
app/code/Kowal/Sentryat the same time. - After installation, you will find the configuration under:
Stores -> Configuration -> Kowal -> Sentry
Quick start
Minimum configuration required to start the module:
- Set
Enable Module = Yes. - Set
Environment, for exampleproductionorstaging. - Enable
Enable Backend Monitoringand pasteBackend DSN. - If you want to monitor the frontend, enable
Enable Frontend Monitoringand pasteFrontend DSN. - 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/0000000000000000Do 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:
acmeis theOrganizationshop-frontendis theProject 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:logConfiguration 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:
Yesin the environment where you want to send data to Sentry.
Environment
Examples:
productionstagingdevelopment
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 theRelease Name Overridefieldenv: release is retrieved from environment variablesfile: release is read from a filegenerated: 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 deploymentsenv: best for CI/CD, when the release is passed through deploymentfile: useful when deployment writes the version identifier to a shared filegenerated: good to start with if you do not yet have a mature release pipeline
Supported environment variables:
KOWAL_SENTRY_RELEASESENTRY_RELEASERELEASE_NAMEGIT_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 loggingNo: production mode
Recommendation:
Noin production,Yestemporarily when diagnosing configuration.
Enable Test Commands
Yes: makesbin/magentotest commands availableNo: hides them during normal operation
Recommendation:
Yeson staging or during testing,Noin 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 monitoringNo: 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 errors0.5: send about half0.25: send about 25%
Recommendation:
- usually
1.0for errors, at least at the beginning.
Trace Sample Rate
Range: 0-1
Examples:
0.05: low sampling, good for production with high traffic0.1: reasonable starting point0.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:
0or a very low value in production.
Enable Logs
Yes: sends structured logsNo: 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 metricsNo: metrics on the module side will not be active
Note:
- the current
sentry/sentry 4.24.xtreats backend metrics as a deprecated /no-opAPI.
Enable Cron Monitoring
Yes: sends cron check-ins and transactionsNo: crons will not be monitored by Sentry
You can find the data in Sentry in the section:
CronsMonitors
Enable CLI Monitoring
Yes: monitorsbin/magentocommandsNo: no CLI process monitoring
Useful for:
- imports,
- reindexing,
- custom integration commands.
Enable Adminhtml Monitoring
Yes: monitors admin panel requestsNo: limits backend to storefront, API, cron, and CLI
Enable API Monitoring
Yes: monitors REST, GraphQL, and other endpointsNo: 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 SDKNo: 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 storefrontNo: no SDK on the public part of the store
Enable Admin JS
Yes: Browser SDK also runs in the admin panelNo: 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 cautious0.05: good start for production0.1: more data, higher volume
JS Replay Session Sample Rate
Range: 0-1
Examples:
0: no full replays0.01: safe start0.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 session0.5: replay after some errors
Recommendation:
- often a better start than high sampling of all sessions.
Enable Session Replay
Yes: enables ReplayNo: no session recording
Recommendation:
- enable together with strong checkout and payment masking.
Enable User Feedback Widget
Yes: the Feedback widget is availableNo: 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 tagsNo: no additional checkout context
Recommendation:
- it is usually worth leaving enabled.
Enable Ajax Instrumentation
Yes: breadcrumbs for AJAX / fetch / XHRNo: 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 dataNo: more conservative privacy policy
Recommendation:
- usually
No.
Anonymize IP
Yes: do not send the full IPNo: leave the standard behavior
Recommendation:
- usually
Yes.
Mask Customer Data
Yes: masks customer dataNo: less data protection
Recommendation:
- almost always
Yesin production.
Mask Checkout Fields
Yes: masks checkout fieldsNo: risk of checkout data leakage
Recommendation:
- always
Yes.
Mask Payment Fields
Yes: masks payment-related fieldsNo: very risky
Recommendation:
- always
Yes.
Block Authorization Headers
Yes: removes or masksAuthorizationand tokensNo: risk of sending authentication data
Recommendation:
- always
Yes.
Block Cookies
Yes: removes cookies from event dataNo: higher risk of session data leakage
Recommendation:
- usually
Yes.
Block POST Bodies
Yes: removesPOSTbodiesNo: sends more request data
Recommendation:
- usually
Yes, especially for checkout, login, and forms.
Redact Query Params
Yes: masks query string parametersNo: query string remains more readable, but less secure
Additional Redacted Keys
Text field for additional keys to redact.
Examples:
tokenapi_keycustomer_emailexternal_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.comapi.example.comtrusted-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 trafficNo: you also monitor automated traffic
Recommendation:
Yeswith high SEO traffic.
Ignore Health Checks
Yes: skips/health,/status,/ping, and similar requestsNo: such requests are sent to Sentry
Ignore Admin Routes
Yes: limits events from the adminNo: admin remains monitored
Ignore Static Resource Errors
Yes: filters some asset errors for.jsand.cssNo: all errors of this type remain visible
Recommendation:
- usually
Yesif 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: attachesstore_id,store_code, store name, and currencyNo: no such context
Recommendation:
Yes, especially with multistore.
Attach Website Context
Yes: attaches website dataNo: no identification at this level
Attach Customer Context
Yes: attaches anonymized customer contextNo: no customer status data
Attach Quote Context
Yes: attaches cart / quote contextNo: less data for checkout diagnostics
Attach Cart Totals
Yes: attaches cart totalsNo: lighter event
Recommendation:
- enable only when this data genuinely helps with analysis.
Attach Order Context
Yes: attaches order contextNo: no data about order flow
Especially useful for:
- invoice,
- shipment,
- transactional emails,
- ERP / OMS integrations.
Attach Product Context
Yes: attaches basic product contextNo: no such context
Attach Category Context
Yes: attaches basic category contextNo: no such context
Attach Payment / Shipping Method
Yes: attachespayment_methodandshipping_methodNo: less data for checkout
Recommendation:
- this is one of the more valuable diagnostic settings.
Attach Module Version
Yes: attaches theKowal_SentryversionNo: without this information in events
Attach Magento Version
Yes: attaches the Magento versionNo: no platform context
Attach Deployment Metadata
Yes: attaches additional deployment data if availableNo: 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 mapsNo: 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: manualsentry-clicommandsci: upload in a CI/CD pipelinedeploy_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:
storefrontadminpl-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.txtpub/media/deploy/release-id.txt
User Feedback section
Configuration of the browser-side issue reporting widget.
Widget Theme
Variants:
lightdarksystem
Recommendation:
- usually
system.
Widget Language
Examples:
pl-PLen-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 appearNo: 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 pageNo: no trigger in this place
Show on contact page
Yes: trigger or widget on the contact pageNo: no exposure on the contact page
Show in footer
Yes: permanently visible trigger in the footer or as a permanent page elementNo: 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 SentryNo: the module sends check-ins without monitor auto-configuration
Recommendation:
Yesif 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_quotescatalog_product_alertindexer_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 = YesEnable Backend Monitoring = YesEnable Frontend Monitoring = YesError Sample Rate = 1Trace Sample Rate = 0.05or0.1JS Trace Sample Rate = 0.01or0.05Enable Session Replay = YesJS Replay Session Sample Rate = 0.01JS Replay On Error Sample Rate = 1Send Default PII = NoAnonymize IP = YesMask Customer Data = YesMask Checkout Fields = YesMask Payment Fields = YesBlock Authorization Headers = YesBlock Cookies = YesBlock POST Bodies = YesRedact Query Params = YesIgnore Bots = YesIgnore Health Checks = Yes
Diagnostic profile for staging
- higher
Trace Sample Rate, for example0.2 - higher
JS Trace Sample Rate, for example0.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 = YesBackend DSNcompletedEnable 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/andapp/code/at the same time. - Different
releasevalues 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.