-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NewRelic Module cannot be removed #35479
Comments
Hi @IbrahimS2. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Please fix this. I can't switch the deploy mode to production otherwise and the store is super slow. Edit: I copied the module app/code/Magento/NewRelicReporting and it now works.. I guess the composer package is broken |
That is the thing; we do not want to have NewRelic entirely. |
@magento give me 2.4-develop instance |
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Dash, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later. |
@magento give me 2.4-develop instance |
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Dash, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later. |
Hi @engcom-Dash. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Dash, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later. |
Hi @IbrahimS2, Can you please guide how you remove the NewRelic module using composer? Because we are unable to find the same in composer.json file of Magento 2.4.4 Thanks |
@engcom-Dash: add the following lines to your
Then execute This is a common practice that Magento developers use to get rid of modules they don't need, see this blog post if you're interested. I agree with the issue report, a dependency on the NewRelicReporting module should have never been made to the GraphQl module, that's bad design! |
Hi @hostep , Thanks. |
✅ Jira issue https://jira.corp.magento.com/browse/AC-5967 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
I suggest that the Magento core team uses https://github.com/yireo/Yireo_ExtensionChecker/ to make sure all dependencies are found 🙈 |
We use GraphQL but not NewRelic, why the deep coupling between the two modules i have no clue, but here's my cent main issue might be: Missing module sequence If you want to patch it while waiting for the core team to figure out how to resolve it: You can use this patch: --- etc/di.xml
+++ etc/di.xml
@@ -104,11 +104,4 @@
<argument name="queryComplexity" xsi:type="number">300</argument>
</arguments>
</type>
- <type name="Magento\GraphQl\Model\Query\Logger\LoggerPool">
- <arguments>
- <argument name="loggers" xsi:type="array">
- <item name="newRelic" xsi:type="object">Magento\GraphQl\Model\Query\Logger\NewRelic</item>
- </argument>
- </arguments>
- </type>
</config>
--- Model/Query/Logger/NewRelic.php
+++ Model/Query/Logger/NewRelic.php
@@ -1,56 +0,0 @@
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-
-namespace Magento\GraphQl\Model\Query\Logger;
-
-use Magento\NewRelicReporting\Model\Config;
-use Magento\NewRelicReporting\Model\NewRelicWrapper;
-
-/**
- * Logs GraphQl query data for New Relic
- */
-class NewRelic implements LoggerInterface
-{
- /**
- * @var Config
- */
- private $config;
-
- /**
- * @var NewRelicWrapper
- */
- private $newRelicWrapper;
-
- /**
- * @param Config $config
- * @param NewRelicWrapper $newRelicWrapper
- */
- public function __construct(
- Config $config,
- NewRelicWrapper $newRelicWrapper
- ) {
- $this->config = $config;
- $this->newRelicWrapper = $newRelicWrapper;
- }
-
- /**
- * @inheritdoc
- */
- public function execute(array $queryDetails)
- {
- if (!$this->config->isNewRelicEnabled()) {
- return;
- }
-
- foreach ($queryDetails as $key => $value) {
- $this->newRelicWrapper->addCustomParameter($key, $value);
- }
-
- $transactionName = $queryDetails[LoggerInterface::OPERATION_NAMES] ?: '';
-
- $this->newRelicWrapper->setTransactionName('GraphQL-' . $transactionName);
- }
-} I've also added the replace on the new relic module to remove it completely from composer
|
Is probably fixed internally by a495fed, I guess this is going to get included in Magento 2.4.7 |
Confirmed with Magento 2.4.7-beta3, we can remove the FYI, you should probably also remove these 2 new modules that come with Magento 2.4.7 if you're not interested in New Relic:
|
Still persist on Magento 2.4.7 |
@tuyennn : No it doesn't, it seems fixed in 2.4.7, see my previous comment... This issue can be closed in my opinion. |
@hostep agreed, that seems I applied the yireo replacement so find out this issue. |
It is fixed and working as expected, I will close this issue. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: