Skip to content
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

fix: Remove duplicated hystrix streams in Metrics Service dashboard #1924

Merged
merged 2 commits into from Nov 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -76,13 +76,18 @@ function addStreams(proxyStream, title) {
var source = new EventSource(proxyStream);

// add the listener that will process incoming events
source.addEventListener('message', hystrixMonitor.eventSourceMessageListener, false);
source.addEventListener('message', dependencyThreadPoolMonitor.eventSourceMessageListener, false);

// source.addEventListener('open', function(e) {
// console.console.log(">>> opened connection, phase: " + e.eventPhase);
// // Connection was opened.
// }, false);
// CHANGE: add filter for adding listener so listener is only added for streams that match the selected stream to display
source.addEventListener('message', (m) => {
if (m.currentTarget && m.currentTarget.url && m.currentTarget.url.endsWith(urlVars.title)) {
hystrixMonitor.eventSourceMessageListener(m);
}
}, false);
source.addEventListener('message', (m) => {
if (m.currentTarget && m.currentTarget.url && m.currentTarget.url.endsWith(urlVars.title)) {
dependencyThreadPoolMonitor.eventSourceMessageListener(m);
}
}, false);
// END OF CHANGE

source.addEventListener('error', function(e) {
$("#" + dependenciesId + " .loading").html("Unable to connect to Command Metric Stream.");
Expand Down