justbetter / magento2-sentry Goto Github PK
View Code? Open in Web Editor NEWMagento 2 module to log to Sentry
License: MIT License
Magento 2 module to log to Sentry
License: MIT License
In Sentry with PHP errors we have the correct value in enviroment tag. But for Javascript errors, the environment tag is not there. It makes it difficult to trace them in our different enviroments.
Do you have a solution to it?
Hi,
The content in file SentryLog.php is a copy of ExceptionCatcher.php. It seems there was an error during file transfer. Can you please reupload SentryLog.php?
Thank you.
I'm on magento 2.1.10 and can't build without commenting out the following line from the di.xml
https://github.com/justbetter/magento2-sentry/blob/master/etc/di.xml#L7
Is there anything that doesn't work from this being disabled i'm not noticing?
It still sends test events and exceptions.
I should also mention that it wouldnt even install via composer install because it wanted a newer version of monolog.
Feature: What is your use case for such a feature?
Since Sentry can also be used in a production environment, improving load performance is desirable.
Feature: What is your proposed configuration entry? The new option to add? What is the behavior?
Sentry has the option to lazy load its SDK as per https://docs.sentry.io/platforms/javascript/install/lazy-load-sentry/
It will require minor modifications to the template to make it compatible.
It also has the additional benefit of automatically using the latest SDK version.
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Magento 2.4.3
Sentry 2.6.0
Circular dependency: JustBetter\Sentry\Plugin\MonologPlugin depends on Magento\Framework\App\Helper\Context and vice versa.#0 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('JustBetter\\Sent...')
#1 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('JustBetter\\Sent...')
#2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Psr\\Log\\LoggerI...', NULL, 'logger', 'Magento\\Framewo...')
#3 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#4 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#5 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#6 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#7 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'context', 'JustBetter\\Sent...')
#8 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('JustBetter\\Sent...', Array, Array)
#9 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('JustBetter\\Sent...', Array, Array)
#10 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('JustBetter\\Sent...')
#11 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('JustBetter\\Sent...')
#12 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'JustBetter\\Sent...', NULL, 'data', 'JustBetter\\Sent...')
#13 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('JustBetter\\Sent...', Array, Array)
#14 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('JustBetter\\Sent...', Array, Array)
#15 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('JustBetter\\Sent...')
#16 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('JustBetter\\Sent...')
#17 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Psr\\Log\\LoggerI...', NULL, 'logger', 'Magento\\Framewo...')
#18 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#19 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#20 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#21 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#22 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'logger', 'Magento\\Framewo...')
#23 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#24 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#25 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#26 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Factory.php(197): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#27 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Factory.php(161): Magento\Framework\App\Cache\Frontend\Factory->_applyDecorators(Object(Magento\Framework\Cache\Frontend\Decorator\TagScope))
#28 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Pool.php(67): Magento\Framework\App\Cache\Frontend\Factory->create(Array)
#29 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Pool.php(146): Magento\Framework\App\Cache\Frontend\Pool->_initialize()
#30 /var/www/html/vendor/magento/framework/App/Cache.php(38): Magento\Framework\App\Cache\Frontend\Pool->get('default')
#31 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(116): Magento\Framework\App\Cache->__construct(Object(Magento\Framework\App\Cache\Frontend\Pool))
#32 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#33 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#34 /var/www/html/vendor/magento/framework/App/Cache/Proxy.php(44): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#35 /var/www/html/vendor/magento/framework/App/Cache/Proxy.php(67): Magento\Framework\App\Cache\Proxy->_getCache()
#36 /var/www/html/vendor/magento/framework/App/ProductMetadata.php(80): Magento\Framework\App\Cache\Proxy->load('mage-version')
#37 /var/www/html/vendor/magento/framework/Console/Cli.php(92): Magento\Framework\App\ProductMetadata->getVersion()
#38 /var/www/html/bin/magento-php(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#39 {main}
Latest 2.2.1
Magento 2.3.3
PHP 7.2
To enforce codestyling, project should utilize phpcsfixer. I will be implementing this into develop branch after #26 has been merged.
Hi,
Does anyone know what the names of the environment variables are that will be used to populate the fields normally defined in env.php for this intergration? Sadly I do not know much about Magento and while I have been able to decode the docs well enough to set certain system wide default web values I do not understand things well enough to work out the names that will map to the Sentry settings.
As an example to provide some context. In the database there is a value stored for the "Web Secure Base URL" which provides the URL that a deployment will use when refering to the site. This can be set by using
CONFIG__DEFAULT__WEB__SECURE__BASE_URL
It is a great way to setup CI systems and docker based deployments, but as I have noted the docs are somewhat light on information, I guess developers just go and read the source code, but my background is OPS, not development.
Thanks
'sentry' => [
'dsn' => 'https://627aac5b01a344898ec4a85b9.......',
'logrocket_key' => 'magento-2-test/magento',
'environment' => 'developer',
'log_level' => \Monolog\Logger::WARNING,
'mage_mode_development' => false
]
I got this error when testing sentry
version 2.2.3
magento/product-community-edition 2.3.4
I followed all the install instructions and added the following to env.php
'sentry' => [
'dsn' => 'https://[email protected]/5273034',
'environment' => 'production',
'log_level' => \Monolog\Logger::WARNING,
'mage_mode_development' => false,
]
I went to Stores > Configuration > JustBetter > Sentry and turned on and tried testing and got the error message Sentry Domain not filled!
What should I do to debug further?
Hi,
I've tried to update the sentry package in my Magento 2.4.3-p1 (and also -p2). But I get an error regarding monolog:
$ bin/composer require justbetter/magento2-sentry
The "hirak/prestissimo" plugin (installed globally) was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.1.0"). You may need to run composer update with the "--no-plugins" option.
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^3.0 for justbetter/magento2-sentry
./composer.json has been updated
The "hirak/prestissimo" plugin (installed globally) was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.1.0"). You may need to run composer update with the "--no-plugins" option.
Running composer update justbetter/magento2-sentry --with-all-dependencies
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- magento/magento2-functional-testing-framework is locked to version 3.5.1 and an update of this package was not requested.
- Conclusion: don't install monolog/monolog 1.18.2 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.19.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.0.2 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.1.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.20.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.21.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.1.1 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.22.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.22.1 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.2.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.3.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.23.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.24.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.3.1 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.25.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.25.1 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.3.2 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.3.3 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.25.2 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.25.3 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.3.4 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.25.4 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.25.5 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.3.5 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.4.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.26.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.26.1 (conflict analysis result)
- Conclusion: don't install monolog/monolog 2.5.0 (conflict analysis result)
- Conclusion: don't install monolog/monolog 1.27.0 (conflict analysis result)
- magento/product-community-edition 2.4.3-p2 requires magento/framework 103.0.3-p2 -> satisfiable by magento/framework[103.0.3-p2].
- magento/product-community-edition is locked to version 2.4.3-p2 and an update of this package was not requested.
- Root composer.json requires justbetter/magento2-sentry ^3.0 -> satisfiable by justbetter/magento2-sentry[3.0.0].
- magento/framework 103.0.3-p2 requires monolog/monolog ^1.17 -> satisfiable by monolog/monolog[1.17.0, ..., 1.27.0].
- You can only install one version of a package, so only one of these can be installed: monolog/monolog[1.0.0, ..., 1.27.0, 2.0.0, ..., 2.5.0].
- justbetter/magento2-sentry 3.0.0 requires monolog/monolog >=2.0.0 -> satisfiable by monolog/monolog[2.0.0, ..., 2.5.0].
- Conclusion: don't install monolog/monolog 2.0.1 (conflict analysis result)
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Is there any plan to be able to use https://docs.sentry.io/product/performance/getting-started/ with this extension? Thank you.
Version 2.0.0
Exception #0 (Symfony\Component\OptionsResolver\Exception\InvalidOptionsException): The option "release" with value 1576503498 is expected to be of type "null" or "string", but is of type "integer".
cat pub/static/deployed_version.txt
1576503498%
Should be cast to string before returning it to sentry SDK I guess..
Hi,
I think in view/frontend/layout/default.xml you need to use referenceBlock instead of referenceContainer. I upgraded the plugin to newest version today in my project and had issues with existing code because of that.
Please check similar issue: magento/magento2#16497
Thanks for all the work you make on this plugin. Really appreciate it.
Regards,
Adam.
Magento 2.3.2 vanilla using luma theme. Very few customisations.
I noticed today on a dev install as soon as sentry extension is enabled when you click save in system configuration you experience slowdown
I've done a bit of profiling and it's not MySQL. MySQL sleep processes stack up whilst waiting on the application.
php-fpm appears to be hanging on something. But I can't pinpoint it to anything particular. New relic simply indicates an increase in response time
It's the difference between a 5 - 10 second save and a 20 - 30 second save
Of course this could be expected behaviour
Interception cache generation... 6/7 [========================>---] 85% 29 secs 290.0 MiB
Errors during compilation:
Magestore\Bannerslider\Model\ResourceModel\Banner\Collection
Incompatible argument type: Required type: \Magento\Framework\DB\Adapter\AdapterInterface. Actual type: \Magento\Framework\Model\ResourceModel\Db\AbstractDb; File:
[PWD]/vendor/magestore/module-bannerslider/Model/ResourceModel/Banner/Collection.php
Total Errors Count: 1
[Magento\Framework\Validator\Exception]
Error during compilation
===========
I tried to install it to Magento 2.2.3
in terminal when using bin/magento setup:upgrade printed message say area did not set and when disable the plug-in magneto 2.2 works fine
When I try installing magento2-sentry 2.1.0 on magento 2.3.3, i get a requirements error for php-http/async-client-implementation.
I am using the command
composer require justbetter/magento2-sentry
Possible Solution: I think that an implementation of php-http/async-client-implementation should be included in the magento2-sentry composer.json. Similar to how psr/http-message-implementation, nyholm/psr7 has been included. What do you think?
Below is the complete error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sentry/sentry 2.2.4 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.2.3 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.2.2 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.2.1 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.2.0 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.1.3 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.1.2 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.1.1 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.1.0 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.0.1 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- sentry/sentry 2.0.0 requires php-http/async-client-implementation ^1.0 -> no matching package found.
- justbetter/magento2-sentry 2.1.0 requires sentry/sdk ^2.0 -> satisfiable by sentry/sdk[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4].
- sentry/sdk 2.0.4 requires sentry/sentry ^2.1.3 -> satisfiable by sentry/sentry[2.1.3, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4].
- sentry/sdk 2.0.2 requires sentry/sentry ^2.0.1 -> satisfiable by sentry/sentry[2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4].
- sentry/sdk 2.0.3 requires sentry/sentry ^2.0.1 -> satisfiable by sentry/sentry[2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4].
- sentry/sdk 2.0.0 requires sentry/sentry ^2.0 -> satisfiable by sentry/sentry[2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4].
- sentry/sdk 2.0.1 requires sentry/sentry ^2.0 -> satisfiable by sentry/sentry[2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4].
- Installation request for justbetter/magento2-sentry ^2.1 -> satisfiable by justbetter/magento2-sentry[2.1.0].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Hey guys!
I really like this extension I would love to use it on Magento cloud projects but I found a big blocker. You are using DeploymentConfig
to get all the configuration sentry settings. The problem with that is you are recollecting these options either from env.php or config.php. For on-premise projects is not a big issue to add all the settings into the env.php file but for Magento Cloud projects isn't possible.
Magento Cloud recommends using environment variables to override settings like CONFIG__DEFAULT__SENTRY__DSN
which in this case is not an option because the extension is using Magento Deployment Configuration.
I just forked your project and I would love to propose one of two solutions.
What do you think?
Feature: What is your use case for such a feature?
Add an extra configuration field that for the minimum severity level before the exception gets logged to Sentry.
This can be any of these constants
https://www.php.net/manual/en/errorfunc.constants.php
The only issue is, the getSeverity function is only available in ErrorException objects https://www.php.net/manual/en/errorexception.getseverity.php
so it may not work for all exceptions.
This allows us to ignore "Info" ErrorExceptions if needed without overwriting the error_reporting
and stopping Magento or other modules from logging this.
Feature: What is your proposed configuration entry? The new option to add? What is the behavior?
'sentry' => [
'dsn' => 'example.com',
'logrocket_key' => 'example/example',
'environment' => null,
'log_level' => \Monolog\Logger::WARNING,
// The new exception_level
'errorexception_level' => E_WARNING
'mage_mode_development' => false,
]
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Magento: 2.4.1
Sentry: 2.5.4
We run a Magneto 2.2.6 Shop and wanted to update the sentry extension to a newer version. We used the 0.6.2 version too long. Composer installed the version 2.2.3.
After that we got some times the Http Error 502 'Bad Gateway'. It was caused bei an nginx error (104: Connection reset by peer while reading response header from upstream) that was caused by an exiting php.
Because the error is not easiliy repeated, we wrote a random test to verify it.
So on PHP 7.1 with Magento 2.2.6 the problem is there and bad because whole pages are not delivered.
We tried to find the cause of the problem also with the help of our hoster but with no results.
With Magento 2.3.2 and PHP 7.3 the problem is gone. So we will concentrate on that.
Do you want to request a feature or report a bug?
Bug: What is the current behavior?
Bug: What is the expected behavior?
Bug: What is the proposed solution?
Feature: What is your use case for such a feature?
Feature: What is your proposed configuration entry? The new option to add? What is the behavior?
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Feature: What is your use case for such a feature?
I am comparing Rollbar vs Sentry and am seeing that Rollbar (while very basic) has good root-level exception handling. This is quite important, and seems to be missing from Sentry (just log publishing).
However, the v2 of the Sentry API has much better exception handling.
Are you open to pull requests? Or, are you already working on such an implementation?
I am using the Magento 2.3.2 with the latest version of this module.
Bug: What is the current behavior?
Running bin/magento setup:di:compile
doesn't work if Magento 2ย is not installed:
$ bin/magento setup:di:compile --verbose
In WebsiteRepository.php line 159:
[DomainException]
The default website isn't defined. Set the website and try again.
Exception trace:
() at /var/www/vendor/magento/module-store/Model/WebsiteRepository.php:159
Magento\Store\Model\WebsiteRepository->getDefault() at /var/www/vendor/magento/module-store/Model/StoreResolver/Website.php:49
Magento\Store\Model\StoreResolver\Website->getAllowedStoreIds() at /var/www/vendor/magento/module-store/Model/StoresData.php:65
Magento\Store\Model\StoresData->getStoresData() at /var/www/vendor/magento/module-store/Model/StoreResolver.php:138
Magento\Store\Model\StoreResolver->getStoresData() at /var/www/vendor/magento/module-store/Model/StoreResolver.php:97
Magento\Store\Model\StoreResolver->getCurrentStoreId() at /var/www/vendor/magento/module-store/Model/StoreManager.php:160
Magento\Store\Model\StoreManager->getStore() at /var/www/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php:119
Magento\Store\Model\StoreManagerInterface\Proxy->getStore() at /var/www/vendor/magento/module-store/Model/Resolver/Store.php:30
Magento\Store\Model\Resolver\Store->getScope() at /var/www/vendor/magento/framework/App/Config/ScopeCodeResolver.php:49
Magento\Framework\App\Config\ScopeCodeResolver->resolve() at /var/www/vendor/magento/framework/App/Config.php:69
Magento\Framework\App\Config->getValue() at /var/www/vendor/justbetter/magento2-sentry/Helper/Data.php:74
JustBetter\Sentry\Helper\Data->getConfigValue() at /var/www/vendor/justbetter/magento2-sentry/Helper/Data.php:85
JustBetter\Sentry\Helper\Data->getGeneralConfig() at /var/www/vendor/justbetter/magento2-sentry/Helper/Data.php:94
JustBetter\Sentry\Helper\Data->collectModuleConfig() at /var/www/vendor/justbetter/magento2-sentry/Helper/Data.php:59
JustBetter\Sentry\Helper\Data->__construct() at /var/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() at /var/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:66
Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() at /var/www/vendor/magento/framework/ObjectManager/ObjectManager.php:70
Magento\Framework\ObjectManager\ObjectManager->get() at /var/www/generated/code/JustBetter/Sentry/Helper/Data/Proxy.php:84
JustBetter\Sentry\Helper\Data\Proxy->_getSubject() at /var/www/generated/code/JustBetter/Sentry/Helper/Data/Proxy.php:119
JustBetter\Sentry\Helper\Data\Proxy->isActive() at /var/www/vendor/justbetter/magento2-sentry/Plugin/MonologPlugin.php:44
JustBetter\Sentry\Plugin\MonologPlugin->addRecord() at /var/www/vendor/monolog/monolog/src/Monolog/Logger.php:623
Monolog\Logger->debug() at /var/www/vendor/magento/framework/Cache/InvalidateLogger.php:46
Magento\Framework\Cache\InvalidateLogger->execute() at /var/www/vendor/magento/framework/Cache/Frontend/Decorator/Logger.php:58
Magento\Framework\Cache\Frontend\Decorator\Logger->log() at /var/www/vendor/magento/framework/Cache/Frontend/Decorator/Logger.php:48
Magento\Framework\Cache\Frontend\Decorator\Logger->clean() at /var/www/vendor/magento/framework/App/Cache.php:102
Magento\Framework\App\Cache->clean() at /var/www/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:153
Magento\Setup\Console\Command\DiCompileCommand->execute() at /var/www/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/vendor/symfony/console/Application.php:893
Symfony\Component\Console\Application->doRunCommand() at /var/www/vendor/symfony/console/Application.php:262
Symfony\Component\Console\Application->doRun() at /var/www/vendor/magento/framework/Console/Cli.php:105
Magento\Framework\Console\Cli->doRun() at /var/www/vendor/symfony/console/Application.php:145
Symfony\Component\Console\Application->run() at /var/www/bin/magento:23
setup:di:compile
Bug: What is the expected behavior?
According to Magento Official Devdoc, it is possible to generate compiled code before installing Magento.
I tried to run it without justbetter/sentry, and the compilation works fine.
My use case is to generate code to allow our code analysis system to detect Factories, Proxiesโฆ
Bug: What is the proposed solution?
Pull request incomingโฆ
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Tested on Magento 2.3.2 and justbetter/sentry version 0.7.2
Default logging level is absolute insanity, and sould probably be removed altogether.
This caused our sentry account to hit it's quota of events within a few page loads. Sending thousands of log entries per page load into a system meant to exception logging is crazy.
It would be great to have LogRocket integration in the extension, see https://blog.logrocket.com/extending-sentry-with-logrocket-52e2f5b67d5a/
Two bits of code should be added;
Right after :
<script src="https://cdn.lr-ingest.io/LogRocket.min.js" crossorigin="anonymous"></script>
<script>window.LogRocket && window.LogRocket.init('INITKEY_HERE');</script>
Before :
LogRocket.getSessionURL(sessionURL => {
Sentry.configureScope(scope => {
scope.setExtra("sessionURL", sessionURL);
});
});
We'll need to add two configuration opties; Enable/disable LogRocket integration, and an input field for the LogRocket init key (which you'll get when you create a project in LogRocket).
At the moment JS error tracking is only working in the frontend (same for logrocket integration).
I'd love to have the error tracking and logrocket integration (with user identification based on logged in adminhtml user) added to the adminhtml area.
That would be a real game changer for us in error tracking.
Is it possible to add this feature? That would be really nice!
Currently errors are only sent to Sentry if Magento is in production
mode. That's great for when the site is running, but not helpful during development. There should be an admin setting to allow for errors to be sent for any/all Magento modes.
Feature: What is your use case for such a feature?
There is no way to disable Php error tracking. This feature will give store admin more flexibility to enable any or both of Php & Javascript error tracking.
Would be good to have a button to send a test event to Sentry to make sure its all working correctly. Often extensions like SMTP email have this and its very useful.
Today we tested the module under Magento 2.4.4 with PHP 7.4, we noticed that if "Use Categories Path for Product URLs" is disabled + multistore the product links within the categories are not correct in the frontend.
Output without PHP tracking:
domain.com/en/category/subcategory
domain.com/en/product-item-url
Output with PHP tracking:
domain.com/en/category/product-item-url
When I try to install justbetter/magento2-sentry ^0.3.0
with composer in Magento 2.2.4 I get an error. The same error occurs when requiring the dev/master
version.
The error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for justbetter/magento2-sentry ^0.3.0 -> satisfiable by justbetter/magento2-sentry[0.3.0].
- justbetter/magento2-sentry 0.3.0 requires magento/framework * -> no matching package found.
"magento/framework": "*"
magento/framework
and composer installing them does not throw an error"magento/framework": "100.1.*|101.0.*"
or "magento/framework": "101.0.*"
The button test configuration in the backend of Magento is not working anymore.
Do you want to request a feature or report a bug?
Bug
Bug: What is the current behavior?
The LogRocket sessionUrl does not show in Sentry's issue report when LogRocket is configured.
Bug: What is the expected behavior?
The LogRocket sessionUrl should show in Sentry's issue report when LogRocket is configured.
Bug: What is the proposed solution?
I'm not sure to be honest, here's a few things I tried but didn't help:
setContext
instead since setExtra
was deprecated.setTag("sessionUrl", sessionUrl)
.5.30.0
version of the JS SDK instead of 5.28.0
.I can confirm LogRocket works as expected and the URL does get generated (I added a console.log(sessionUrl)
and visiting the logged URL does show the session replay fine). I'm not sure if this is an issue with the module or LogRocket/Sentry.
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Magento 2.4.1
Module 2.5.0
Issues with Magento 2.2.5.
installed via composer
"justbetter/magento2-sentry": "^0.4.1"
Random errors pop up, for example when generating a sitemap, or cache flushed.
'Area code is already set'
stack trace:
#0 Magento\Framework\App\State->setAreaCode() called at [/var/www/html/vendor/justbetter/magento2-sentry/Helper/Data.php:62] #1 JustBetter\Sentry\Helper\Data->__construct() called at [/var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111] #2 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [/var/www/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php:108] #3 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [/var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php:70] #4 Magento\Framework\ObjectManager\ObjectManager->get() called at [/var/www/html/generated/code/JustBetter/Sentry/Helper/Data/Proxy.php:84] #5 JustBetter\Sentry\Helper\Data\Proxy->_getSubject() called at [/var/www/html/generated/code/JustBetter/Sentry/Helper/Data/Proxy.php:119] #6 JustBetter\Sentry\Helper\Data\Proxy->isActive() called at [/var/www/html/vendor/justbetter/magento2-sentry/Plugin/MonologPlugin.php:44] #7 JustBetter\Sentry\Plugin\MonologPlugin->addRecord() called at [/var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php:532] #8 Monolog\Logger->debug() called at [/var/www/html/vendor/magento/framework/Cache/InvalidateLogger.php:42] #9 Magento\Framework\Cache\InvalidateLogger->execute() called at [/var/www/html/vendor/magento/framework/Cache/Frontend/Decorator/Logger.php:58] #10 Magento\Framework\Cache\Frontend\Decorator\Logger->log() called at [/var/www/html/vendor/magento/framework/Cache/Frontend/Decorator/Logger.php:48] #11 Magento\Framework\Cache\Frontend\Decorator\Logger->clean() called at [/var/www/html/vendor/magento/module-backend/Controller/Adminhtml/Cache/FlushSystem.php:27] #12 Magento\Backend\Controller\Adminhtml\Cache\FlushSystem->execute() called at [/var/www/html/vendor/magento/framework/App/Action/Action.php:107] #13 Magento\Framework\App\Action\Action->dispatch() called at [/var/www/html/vendor/magento/module-backend/App/AbstractAction.php:229] #14 Magento\Backend\App\AbstractAction->dispatch() called at [/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58] #15 Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->___callParent() called at [/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138] #16 Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->Magento\Framework\Interception{closure}() called at [/var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143] #17 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [/var/www/html/vendor/magento/framework/Interception/Interceptor.php:135] #18 Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->Magento\Framework\Interception{closure}() called at [/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153] #19 Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->___callPlugins() called at [/var/www/html/generated/code/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem/Interceptor.php:26] #20 Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->dispatch() called at [/var/www/html/vendor/magento/framework/App/FrontController.php:55] #21 Magento\Framework\App\FrontController->dispatch() called at [/var/www/html/vendor/magento/framework/Interception/Interceptor.php:58] #22 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [/var/www/html/vendor/magento/framework/Interception/Interceptor.php:138] #23 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}() called at [/var/www/html/vendor/magento/framework/Interception/Interceptor.php:153] #24 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [/var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php:26] #25 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [/var/www/html/vendor/magento/framework/App/Http.php:135] #26 Magento\Framework\App\Http->launch() called at [/var/www/html/vendor/magento/framework/App/Bootstrap.php:256] #27 Magento\Framework\App\Bootstrap->run() called at [/var/www/html/index.php:39]
It's just a question regarding the script tag placement.
Why is there the opportunity to choose where to initialise the script tag?
As it is defined in the Sentry Docs I think it would be better to just implement it in the header. "You should init the Sentry Browser SDK as soon as possible during your page load" (https://docs.sentry.io/platforms/javascript/#configure-the-sdk)
Getting lots of empty exceptions through
Discarded invalid value for parameter 'sentry.interfaces.Message'
value:
{
formatted: {},
message: {},
params: []
}
latest version, running on Magento 2.1
To keep codestyling same everywhere, we should utilize PHPCSFixer which will perform automatically fixes into code style. Example configuration will be posted via PR.
The url that is sent to sentry is incorrect in our setup. Our Apache web server is running on port 30000, in our AWS ELB we forward ports 80 and 443 to 30000 (for load balancing and SSL offload). When an exception occurs, the correct domain is sent, but it is including the internal port.
Magento: 2.2.6
"justbetter/magento2-sentry": "0.4.2"
Do you want to request a feature or report a bug?
request feature
Feature: What is your use case for such a feature?
I need to know with whom the error happened such that I can be able to proactively contact the user and request more info or let them know they should update the app somehow.
Feature: What is your proposed configuration entry? The new option to add? What is the behavior?
When the user is logged in use Raven.setUser()
and include the logged in user details there
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Magento 2.3.1
Magento2Sentry 0.7.2
I just installed the module for the first time. The installation had no errors but when i open the module config in the backend (path admin/system_config/edit/section/sentry/) i get this error message:
1 exception(s):
Exception #0 (ReflectionException): Class JustBetter\Sentry\Model\Config\Source\ScriptTagPlacement does not exist
Exception #0 (ReflectionException): Class JustBetter\Sentry\Model\Config\Source\ScriptTagPlacement does not exist
#0 /var/www/public/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('JustBetter\\Sent...')
#1 /var/www/public/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('JustBetter\\Sent...')
#2 /var/www/public/vendor/magento/framework/ObjectManager/Factory/Compiled.php(100): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('JustBetter\\Sent...')
#3 /var/www/public/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('JustBetter\\Sent...')
#4 /var/www/public/vendor/magento/module-config/Model/Config/SourceFactory.php(37): Magento\Framework\ObjectManager\ObjectManager->get('JustBetter\\Sent...')
#5 /var/www/public/vendor/magento/module-config/Model/Config/Structure/Element/Field.php(440): Magento\Config\Model\Config\SourceFactory->create('JustBetter\\Sent...')
#6 /var/www/public/vendor/magento/module-config/Model/Config/Structure/Element/Field.php(376): Magento\Config\Model\Config\Structure\Element\Field->_getOptionsFromSourceModel('JustBetter\\Sent...')
#7 /var/www/public/vendor/magento/module-config/Block/System/Config/Form.php(404): Magento\Config\Model\Config\Structure\Element\Field->getOptions()
#8 /var/www/public/vendor/magento/module-config/Block/System/Config/Form.php(325): Magento\Config\Block\System\Config\Form->_initElement(Object(Magento\Config\Model\Config\Structure\Element\Field\Interceptor), Object(Magento\Framework\Data\Form\Element\Fieldset), 'sentry/general/...', '', '')
#9 /var/www/public/vendor/magento/module-config/Block/System/Config/Form.php(265): Magento\Config\Block\System\Config\Form->initFields(Object(Magento\Framework\Data\Form\Element\Fieldset), Object(Magento\Config\Model\Config\Structure\Element\Group\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Section))
#10 /var/www/public/vendor/magento/module-config/Block/System/Config/Form.php(211): Magento\Config\Block\System\Config\Form->_initGroup(Object(Magento\Config\Model\Config\Structure\Element\Group\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Section), Object(Magento\Framework\Data\Form))
#11 /var/www/public/vendor/magento/module-config/Block/System/Config/Form.php(548): Magento\Config\Block\System\Config\Form->initForm()
#12 /var/www/public/vendor/magento/framework/View/Element/AbstractBlock.php(666): Magento\Config\Block\System\Config\Form->_beforeToHtml()
#13 /var/www/public/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Element\AbstractBlock->toHtml()
#14 /var/www/public/vendor/magento/framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('system\\config\\f...')
#15 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('system\\config\\f...')
#16 /var/www/public/vendor/magento/framework/View/Element/AbstractBlock.php(507): Magento\Framework\View\Layout->renderElement('system\\config\\f...', true)
#17 /var/www/public/vendor/magento/module-config/view/adminhtml/templates/system/config/edit.phtml(22): Magento\Framework\View\Element\AbstractBlock->getChildHtml('form')
#18 /var/www/public/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/public...')
#19 /var/www/public/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Config\Block\System\Config\Edit), '/var/www/public...', Array)
#20 /var/www/public/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/public...')
#21 /var/www/public/vendor/magento/module-backend/Block/Template.php(126): Magento\Framework\View\Element\Template->_toHtml()
#22 /var/www/public/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Backend\Block\Template->_toHtml()
#23 /var/www/public/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Element\AbstractBlock->toHtml()
#24 /var/www/public/vendor/magento/framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('system.config.e...')
#25 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('system.config.e...')
#26 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('system.config.e...', false)
#27 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('content', false)
#28 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('content')
#29 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('content', false)
#30 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('admin.scope.col...', false)
#31 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('admin.scope.col...')
#32 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('admin.scope.col...', false)
#33 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('main.col', false)
#34 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('main.col')
#35 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('main.col', false)
#36 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.main.conta...', false)
#37 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('page.main.conta...')
#38 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('page.main.conta...', false)
#39 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.content', false)
#40 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('page.content')
#41 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('page.content', false)
#42 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#43 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#44 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#45 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('backend.page', false)
#46 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('backend.page')
#47 /var/www/public/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout->renderElement('backend.page', false)
#48 /var/www/public/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('root', false)
#49 /var/www/public/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout->renderNonCachedElement('root')
#50 /var/www/public/vendor/magento/framework/View/Layout.php(954): Magento\Framework\View\Layout->renderElement('root')
#51 /var/www/public/generated/code/Magento/Framework/View/Layout/Interceptor.php(37): Magento\Framework\View\Layout->getOutput()
#52 /var/www/public/vendor/magento/framework/View/Result/Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#53 /var/www/public/vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#54 /var/www/public/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(24): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#55 /var/www/public/vendor/magento/framework/App/Http.php(139): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#56 /var/www/public/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#57 /var/www/public/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#58 {main}
The error seems to be the new field script_tag_placement. When i remove it from justbetter/magento2-sentry/etc/adminhtml/system.xml and clear the cache, the error is gone.
Magento 2.3.3
magento2-sentry 2.1.0
php bin/magento app:config:dump
Circular dependency: JustBetter\Sentry\Plugin\MonologPlugin depends on Magento\Framework\App\Helper\Context and vice versa.#0 /data/clientname/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Just
Better\\Sent...')
#1 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('JustBetter\\Sent...')
#2 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Psr\\Log\\LoggerI...', NULL, 'logger', 'Magento\\Framewo...')
#3 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#4 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#5 /data/clientname/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#6 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#7 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'context', 'JustBetter\\Sent...')
#8 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('JustBetter\\Sent...', Array, Array)
#9 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('JustBetter\\Sent...', Array, Array)
#10 /data/clientname/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('JustBetter\\Sent...')
#11 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('JustBetter\\Sent...')
#12 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'JustBetter\\Sent...', NULL, 'data', 'JustBetter\\Sent...')
#13 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('JustBetter\\Sent...', Array, Array)
#14 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('JustBetter\\Sent...', Array, Array)
#15 /data/clientname/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('JustBetter\\Sent...')
#16 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('JustBetter\\Sent...')
#17 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Psr\\Log\\LoggerI...', NULL, 'logger', 'Magento\\Framewo...')
#18 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#19 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#20 /data/clientname/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#21 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#22 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'logger', 'Magento\\Framewo...')
#23 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array)
#24 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array)
#25 /data/clientname/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#26 /data/clientname/magento2/vendor/magento/framework/App/Cache/Frontend/Factory.php(197): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#27 /data/clientname/magento2/vendor/magento/framework/App/Cache/Frontend/Factory.php(161): Magento\Framework\App\Cache\Frontend\Factory->_applyDecorators(Object(Magento\Framework\Cache\Frontend\Decorator\TagScope))
#28 /data/clientname/magento2/vendor/magento/framework/App/Cache/Frontend/Pool.php(67): Magento\Framework\App\Cache\Frontend\Factory->create(Array)
#29 /data/clientname/magento2/vendor/magento/framework/App/Cache/Frontend/Pool.php(146): Magento\Framework\App\Cache\Frontend\Pool->_initialize()
#30 /data/clientname/magento2/vendor/magento/framework/App/Cache.php(38): Magento\Framework\App\Cache\Frontend\Pool->get('default')
#31 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(116): Magento\Framework\App\Cache->__construct(Object(Magento\Framework\App\Cache\Frontend\Pool))
#32 /data/clientname/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#33 /data/clientname/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#34 /data/clientname/magento2/vendor/magento/framework/App/Cache/Proxy.php(44): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#35 /data/clientname/magento2/vendor/magento/framework/App/Cache/Proxy.php(67): Magento\Framework\App\Cache\Proxy->_getCache()
#36 /data/clientname/magento2/vendor/magento/framework/App/ProductMetadata.php(80): Magento\Framework\App\Cache\Proxy->load('mage-version')
#37 /data/clientname/magento2/vendor/magento/framework/Console/Cli.php(92): Magento\Framework\App\ProductMetadata->getVersion()
#38 /data/clientname/magento2/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#39 {main}
Do you want to request a feature or report a bug?
bug
Bug: What is the current behavior?
When I enable this module,the admin panel will sign out soon after sign in.But the website front is normal.
Bug: What is the expected behavior?
sign in normal.
Bug: What is the proposed solution?
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Magento version:2.4.2
sentry version:2.6
We're now at 4.5.3 while 5.91 is the most recent version. See changelog here; https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md
Everytime we do a new deploy, we suddenly see a spike in frontend errors. When I dove deeper into this, I noticed this is because after a deploy the static version signing URL is changed, and Sentry thinks it is a new issue (because new URL).
The same problem appears for different storeviews. These URLs are now seen as individual URLs while they should be grouped imho;
ReferenceError if(version1606832327/frontend/Elgentos/client/en_US/knockoutjs/knockout)
ReferenceError if(version1606832327/frontend/Elgentos/client/en_GB/knockoutjs/knockout)
ReferenceError if(version1606832327/frontend/Elgentos/client/nl_NL/knockoutjs/knockout)
ReferenceError if(version1606832327/frontend/Elgentos/client/de_DE/knockoutjs/knockout)
ReferenceError if(version1606832123/frontend/Elgentos/client/en_US/knockoutjs/knockout)
ReferenceError if(version1606832123/frontend/Elgentos/client/en_GB/knockoutjs/knockout)
ReferenceError if(version1606832123/frontend/Elgentos/client/nl_NL/knockoutjs/knockout)
ReferenceError if(version1606832123/frontend/Elgentos/client/de_DE/knockoutjs/knockout)
Is there a way to make Sentry ignore these parts of the URL when fingerprinting? I've read their docs on fingerprint but can't find anything regarding this. Or maybe we could adjust the extension so it strips out these parts (probably by introducing a new config option that is disabled by default)?
Hi
After updating to the latest version of this module, it seems it is no longer possible to setup using CLI.
php ~/public_html/bin/magento module:enable JustBetter_Sentry
php ~/public_html/bin/magento config:set sentry/general/enabled 1
php ~/public_html/bin/magento config:set sentry/general/dsn https://[email protected]/1234567
php ~/public_html/bin/magento config:set sentry/general/environment under-development
This was working in previous a previous version but now I get an error saying that the path doesnt exist.
Have the configuration path been changed? I understand that the settings have been moved, but even with --lock-env
it still doesnt work
I am sure it is just me who missed something obvious, but not sure what it is :)
Feature: What is your use case for such a feature?
Right now to stop Sentry error tracking we have to disable the module for which one needs to be comfortable with the command line and have basic knowledge about Magento. It will be good if we can have the functionality to disable or enable from Magento Admin so that store admin can do this without having to connect with the developer.
Feature: What is your proposed configuration entry? The new option to add? What is the behavior?
We can use enable_sentry
configuration entry.
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
We are using 2.3.0
.
After install this extension on Magento 2.4.4 with PHP 8.1 (with --ignore-platform-reqs
composer flag), I'm getting this error when running bin/magento setup:upgrade
;
PHP Fatal error: Declaration of JustBetter\Sentry\Plugin\MonologPlugin::addRecord($level, $message, array $context = []) must be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = []): bool in /data/client/magento2/vendor/justbetter/magento2-sentry/Plugin/MonologPlugin.php on line 54
Do you want to request a feature or report a bug?
bug
Bug: What is the current behavior?
Script tag is included when admin configuration "Enable Sentry script tag" is set to 'No'
Bug: What is the expected behavior?
Script tag respects admin config
Bug: What is the proposed solution?
Update Helper/Data.php to correctly use admin configuration.
What is the version of Magento and of Sentry extension you are using? Always use the latest version of the extension one before opening a bug issue.
Magento 2.3.3 and Justbetter Sentry v2.2.1
** More Detail **
Believe it was this change which introduced it: 1f60b01#diff-735f70c1f948ebbd90915b1548d93432R161
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.