-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve scannable name() when debug() mode is enabled #1115
Comments
@smaldini can you detail a little bit, with a concrete example? I'm not sure I fully understand the requested enhancement. |
So right now if you do Hooks.onOperators.debug();
Mono<?> m=
Flux.from(s -> Scannable.from(s).actuals().forEach(sc -> System.out.println(sc.name())))
.map(a -> a)
.filter(a -> true)
.reduce((a, b) -> b);
System.out.println("Scan actual subscribers:");
m .subscribe();
System.out.println("\nScan parent publishers:");
Scannable.from(m).parents().forEach(sc -> System.out.println(sc.name())); You should see something like:
I propose to filter assembly operators from such parents()/actuals() if possible and better, try to reuse the stacktrace first line as a name output like "FluxReduce(MyCode:123)" |
In your example I think you should have used I don't think that eliminating Perhaps |
This commit disambiguates the `Scannable#name()` by aliasing it to `sequenceName()`. It also adds convenience stream variants to `parents` and `actuals` that include the current `Scannable`. `InnerConsumer` subscribers have an `operatorName()` implementation that returns their simple class name. Finally, this commit adds a special implementation of operatorName to the various `xxxOnAssembly` operators and subscribers which returns the assembly stack trace's first line (trimmed of whitespaces/tabs).
This commit disambiguates the `Scannable#name()` by aliasing it to `sequenceName()`. It also adds convenience stream variants to `parents` and `actuals` that include the current `Scannable`. `InnerConsumer` subscribers have an `operatorName()` implementation that returns their simple class name. Finally, this commit adds a special implementation of operatorName to the various `xxxOnAssembly` operators and subscribers which returns the assembly stack trace's first line (trimmed of whitespaces/tabs).
See further discussion in #1140 |
If scanning parent publisher (Flux/Mono)
If scanning parent subscription :
For both scan, filter the assembly operators from the actuals()/parents()/inners()
The text was updated successfully, but these errors were encountered: