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
PAYARA-4097 Presets for Monitoring Console #4203
Conversation
…, less noise metrics
public void postConstruct(){ | ||
//Register the Web stats providers | ||
registerWebStatsProviders(); | ||
} | ||
|
||
private synchronized void registerWebStatsProviders() { | ||
if (isWebStatsProvidersRegistered.get()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I found an inconsistency in behaviour when investigating why undeloy + deploy would cause configuration level not have the expected effect. The registerWebStatsProviders
would be called in postConstruct
and when new application was registered since unregistering an application would remove the providers in case this was the last application. This seems inconsistent since on server startup those provider do exist even with no application. Since there might be something depending on this I decided that it was the best fix to never remove them to be consistent over time. This however did not solve the ineffective configuration.
} | ||
else { | ||
times.setEndCpuTime(c); | ||
times.setEndUserTime(u); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Having to duplicate the computation of CPU usage for the statistic provider where such a value was added I needed to understand what is computed. Doing this I discovered that the temporary map for the statistics per thread does not serve any purpose other than totalling the time of all threads which simply could be done by looping and adding their times directly.
jenkins test please |
jenkins test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question but otherwise seems fine.
Built it & gave it some poking locally and nothing exploded.
<plugins> | ||
<plugin> | ||
<groupId>com.bekioui.maven.plugin</groupId> | ||
<artifactId>merge-maven-plugin</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to avoid bringing in third-party dependencies and plugins when they aren't strictly necessary.
Is there specifically a reason that you need this plugin to "merge" these files?
License seems to be fine as its Apache, just want to hear your reasoning :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no particular reason other than finding a platform independent way of merging the JS files into one. Having everything in one file got out of hand length wise so I split it to multiple files that are merged. But I also didn't want to pull in the full JS build stack madness so I found the merge plugin that does everything I need for now. Maybe there is a better way that I just have not thought about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pandrex247 Are you happy with the use of the plugin or should we look into how to else solve the issue? I'd imagine a web-server might have some feature to serve a virtual file composed of a list of resource files? :)
Jenkins test please |
Summary
Changes in context of to the task goal of having a preset starting page for the Monitoring Console:
CpuUsageHealthCheck
This PR also contains numerous other changes and improvements (done between sprints):
ns:<ns> [@:<group>] <metric>
)Review Notes
On Javascript code I don't think there is a point in reviewing the exact details. At this point we should focus on the general code style. Please add your suggestions on how to improve.
I split the sources into multiple files which are merged as part of the build so keep it at more manageable sizes. So
monitoring-console.js
is generated and does not need a review.Testing
appserver/monitoring-console/webapp
localhost:8080/monitoring-console-webapp/
Browser should now show the 5 metrics requested by the task. (see Jira)
Request Count and Active Sessions will be zero since monitoring level has to switched to HIGH first. To do that:
Request Count should now start to show data. Active Sessions might still be zero because no session exist.
To test the reset move a chart left or right or remove it (x) and then press the rest button (most left on top icon toolbar).
The full UI configuration can also be exported and imported using the buttons right to the reset button in the top icon toolbar.