Skip to content
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

Magento 2 Support : Controller Decomposition #690

Open
sankalpshekhar opened this issue Jul 5, 2023 · 0 comments
Open

Magento 2 Support : Controller Decomposition #690

sankalpshekhar opened this issue Jul 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@sankalpshekhar
Copy link

Description

In recent years Magento has introduced controller decomposition to provide a performance boost, wherein the controllers are suggested to no more inherit the Magento\Framework\App\Action\Action class for frontend controllers.

The Action class has been marked deprecated. However, the classes in the core haven't been updated to new recommendations.

But as a developer, if we use the recommended approach (to gain performance), NR doesn't identify them as distinct transactions and rolls all of them to as WebTransaction/Action/FrontController/Magento\Framework\App\FrontController\Interceptor. Hence making the NewRelic transaction monitoring ineffective.

Steps to Reproduce

  1. Create a custom module in Magento
  2. Add 2 Controller classes with different implementations, one that extends the deprecated class and the other with an interface approach (as recommended in the decomposition article)
  3. Hit the URLs multiple times to trigger NewRelic monitoring
  4. Head to NRQL and execute a query similar to the one below and check for the transaction names

SELECT timestamp, appName, name, request.uri from Transaction WHERE appName ='some_app_name' and request.uri like '%common_controller_name%'

Expected Behavior

Each controller action is listed distinctly in the transactions.

Relevant Logs / Console output

Your Environment

  • ex: Browser name and version:
  • ex: Operating System and version:

Additional context

@sankalpshekhar sankalpshekhar added the bug Something isn't working label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant