Skip to content

Conversation

@andrewhowdencom
Copy link
Contributor

@andrewhowdencom andrewhowdencom commented May 12, 2018

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

  • [ x] Pull request has a meaningful description of its purpose
  • [x ] All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@andrewhowdencom
Copy link
Contributor Author

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.
@andrewhowdencom
Copy link
Contributor Author

See https://github.com/sitewards/Magento2-OpenCensus for an implementation of this.

@andrewhowdencom
Copy link
Contributor Author

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.

@magento-cicd2
Copy link
Contributor

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ sidolov
❌ andrewhowdencom

@sidolov
Copy link
Contributor

sidolov commented Aug 9, 2018

Hi @andrewhowdencom , looks like something went wrong with CLA assistant. Can you sign the CLA once again?
Thank you!

@magento-engcom-team
Copy link
Contributor

@andrewhowdencom thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@andrewhowdencom
Copy link
Contributor Author

Hola @sidolov I would but it's dead (:
hesdeadjiim

@magento-engcom-team
Copy link
Contributor

Hi @andrewhowdencom. Thank you for your contribution.
We will aim to release these changes as part of 2.2.7.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants