-
Notifications
You must be signed in to change notification settings - Fork 9.4k
AD-HOC feat (Profiler): Allow supplying complex profiler configuration #15171
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
AD-HOC feat (Profiler): Allow supplying complex profiler configuration #15171
Conversation
|
So i'm still messing around with this. Stay tuned I guess? |
Magento 2 provides a primitive creating profiles of the application, similar to those esposed by the transaction tracing community. These allow getting a granular view of the application based on a custom set of metrics, rather than relying on PHP callgraph profilers to determine how an application is behaving. It is currently possible to modify the *output* of a transaction trace. However, it is not currently possible to modify *the transaction trace driver*. This commit seeks to extend the configuration such that the driver itself can be replaced, rather than simply the output. This allows replacing the driver entirely with something like the OpenTracing API, which can then use its own exporters to express the code to something like the CNCF Jaeger project. This, in turn, allows getting a granular view of the transactions in an application. == Design Notes == === Minimal changes === Considerable additional work is bring prototyped with the alpha OpenCensus APIs, however at this time this is inappropriate to be merged into the core. The APIs are immature, and the approach for reading transaction traces not finalised. This allows continued experimentation up to and including deployment to production infrastructure without committing early to supporting this model of profiling. === Variables prefixed with "profiler" === At first glace, the variables appear to be unnecessarily verbose. However, they are declared in the global context, and are thus namespaced to avoid collisions.
|
See https://github.com/sitewards/Magento2-OpenCensus for an implementation of this. |
|
See https://medium.com/@andrewhowdencom/transaction-tracing-in-magento-2-3ebb784320b3 At the time of comment, is not done yet. But perhaps explains some of the value proposition here. |
|
|
|
Hi @andrewhowdencom , looks like something went wrong with CLA assistant. Can you sign the CLA once again? |
|
@andrewhowdencom thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
|
Hola @sidolov I would but it's dead (: |
|
Hi @andrewhowdencom. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |

Magento 2 provides a primitive creating profiles of the application,
similar to those esposed by the transaction tracing community. These
allow getting a granular view of the application based on a custom set
of metrics, rather than relying on PHP callgraph profilers to determine
how an application is behaving.
It is currently possible to modify the output of a transaction trace.
However, it is not currently possible to modify the transaction trace
driver. This commit seeks to extend the configuration such that the
driver itself can be replaced, rather than simply the output.
This allows replacing the driver entirely with something like the
OpenTracing API, which can then use its own exporters to express the
code to something like the CNCF Jaeger project.
This, in turn, allows getting a granular view of the transactions in an
application.
== Design Notes ==
=== Minimal changes ===
Considerable additional work is bring prototyped with the alpha
OpenCensus APIs, however at this time this is inappropriate to be merged
into the core. The APIs are immature, and the approach for reading
transaction traces not finalised.
This allows continued experimentation up to and including deployment to
production infrastructure without committing early to supporting this
model of profiling.
=== Variables prefixed with "profiler" ===
At first glace, the variables appear to be unnecessarily verbose.
However, they are declared in the global context, and are thus
namespaced to avoid collisions.
Contribution checklist