eclipse-vertx / eclipse-vertx/vert.x
listen Vertx.Context lifecycle
- Dominant language
- Java
- Stars
- 14.7k
- Forks
- 2.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 28
Description
Good day everyone!
I kindly ask you to look this request.
I think it's not require a huge development in the framework but this functionality can help to people who using Vert.x minimize a time to dev testing and debugging code. This request more related to enterprise development and solutions where are tons of business logic and spaghetti code.
**Motivation:**
Vert.x is reactive framework and working with events. (sorry if my terminology is wrong or different from official). This code executed in atomic events and sometimes need to spend a lot of time to understand what is execution path and "why this code working minutes instead of milliseconds". This small proposal can help to application profiling and improve invistigations speed in development.
**Introduction:**
At this moment Vert.x have 2 functionalities(maybe I miss something) to track what is happen with the logic what in context:
1. io.vertx.core.spi.metrics.VertxMetrics
2. io.vertx.core.spi.tracing.VertxTracer
This functionality can help with "single events" but very interesting to see what is happen from begining to the end.
**What's want to see:**
Events what happen in the context. Something like:
Context.OnCreated
Context.OnFeatureBegin
Context.FeatureComplete
Context.FeatureFail
Context.OnFeatureEnd
Context.OnClosed (looks like ContextInternal.addCloseHook)
maybe it's not full list and you see some additional events.
In general this functionality can help to map all events in one context and see something like classical stacktrace and give ability to some manipulations with business logic like tracking path with parameters/timings/etc.
As I mentoned above - it's something like profiling in application level.
At this moment it's possible to do only with additional code in each method what executed in Vert.x context or over org.objectweb.asm.* and hacking a classes.
What are you think about it?
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.