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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atm monitoring UI #815

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Conversation

th3M1ke
Copy link
Contributor

@th3M1ke th3M1ke commented Sep 22, 2021

Which problem is this PR solving?

Short description of the changes

  • Functional logic and unit tests 馃檪

@albertteoh
Copy link
Contributor

@th3M1ke please sign your commits.

@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #815 (a041529) into master (be446bc) will increase coverage by 0.12%.
The diff coverage is 99.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #815      +/-   ##
==========================================
+ Coverage   95.31%   95.44%   +0.12%     
==========================================
  Files         231      240       +9     
  Lines        7103     7458     +355     
  Branches     1709     1811     +102     
==========================================
+ Hits         6770     7118     +348     
- Misses        327      334       +7     
  Partials        6        6              
Impacted Files Coverage 螖
packages/jaeger-ui/src/components/App/index.js 100.00% <酶> (酶)
...s/jaeger-ui/src/utils/redux-form-field-adapter.tsx 100.00% <酶> (酶)
packages/jaeger-ui/src/components/App/TopNav.tsx 91.66% <50.00%> (-2.46%) 猬囷笍
...c/components/Monitor/ServicesView/serviceGraph.tsx 98.07% <98.07%> (酶)
...r-ui/src/components/Monitor/ServicesView/index.tsx 98.71% <98.71%> (酶)
packages/jaeger-ui/src/actions/jaeger-api.js 100.00% <100.00%> (酶)
packages/jaeger-ui/src/api/jaeger.js 100.00% <100.00%> (酶)
...ger-ui/src/components/Monitor/EmptyState/index.tsx 100.00% <100.00%> (酶)
...nitor/ServicesView/operationDetailsTable/index.tsx 100.00% <100.00%> (酶)
...or/ServicesView/operationDetailsTable/opsGraph.tsx 100.00% <100.00%> (酶)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update be446bc...a041529. Read the comment docs.

@Ashmita152
Copy link

I tried testing this with @albertteoh's ATM docker-compose today. It worked like charm 馃帀 馃帀 . Screenshots to get the look and feel. These are from /monitoring endpoint.

Screen Shot 2021-09-27 at 10 18 49 pm

Screen Shot 2021-09-27 at 10 18 28 pm

Screen Shot 2021-09-27 at 10 17 47 pm

Great work @th3M1ke 馃コ 馃嵕

@albertteoh
Copy link
Contributor

@rubenvp8510 @yoave23 would you be able to take a look over this PR if you get a chance, please (I'm pretty inexperienced with react)?

header={<h2 className="ub-m0">Get started with Services Monitoring</h2>}
footer={
<Button
style={{ backgroundColor: '#199', color: '#fff' }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use an style for this? or there is any reason for put this directly on the style attribute?

@rubenvp8510
Copy link
Collaborator

rubenvp8510 commented Sep 29, 2021

Small optional comment! overall Looks good! Awesome work!

rubenvp8510
rubenvp8510 previously approved these changes Sep 29, 2021
yoave23
yoave23 previously approved these changes Sep 29, 2021
Copy link
Contributor

@yoave23 yoave23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great 馃憤
some minor comments inside.

packages/jaeger-ui/src/actions/jaeger-api.js Show resolved Hide resolved
@@ -68,13 +69,22 @@ if (getConfigValue('qualityMetrics.menuEnabled')) {
});
}

if (getConfigValue('monitoring.menuEnabled')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to document it somewhere


const props = mapStateToProps(state);

Date.now = jest.fn(() => 1487076708000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move the date to a constant with a meaningful name

import { ActionFunction, Action } from 'redux-actions';
// @ts-ignore
import { Field, formValueSelector, reduxForm } from 'redux-form';
// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think you need to ignore this one

style={{ fontSize: 14, width: 218 }}
value={this.state.searchOps}
disabled={metrics.operationMetricsLoading === true}
onChange={a => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use something more meaningful than a

endTime: 1632133918915,
lookback: 3600 * 1000,
serviceName: 'serviceName',
// state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state?

@th3M1ke th3M1ke dismissed stale reviews from yoave23 and rubenvp8510 via a4ba580 October 1, 2021 16:40
@th3M1ke
Copy link
Contributor Author

th3M1ke commented Oct 6, 2021

Closing PR just for rerun pipeline

@th3M1ke th3M1ke closed this Oct 6, 2021
@th3M1ke th3M1ke reopened this Oct 6, 2021
@jpkrohling
Copy link
Contributor

@th3M1ke, is this ready for re-review? We have a release going out today, but I think it's too late to include this, right?

@th3M1ke
Copy link
Contributor Author

th3M1ke commented Oct 6, 2021

Yes, it's ready for re-review, I believe. I got approves from @yoave23 and @rubenvp8510, but they were reset because of a new commit with code coverage increase. Also we plan to review performance this Friday with @albertteoh.

@albertteoh
Copy link
Contributor

albertteoh commented Oct 6, 2021

This is looking great @th3M1ke!

The following are just a few things I noticed while playing around with it:

The text in the "Impact" column's "info" is wrapping in the middle of words. It would be better to wrap on the word boundaries:
Screen Shot 2021-10-06 at 11 01 59 pm


How will a user know what percentile the latency column is displaying? I'm assuming it's 95th percentile based on the colour scheme
Screen Shot 2021-10-06 at 11 02 10 pm


The horizontal alignment for the lookback seems a little off from both the service dropdown and the "Aggregation of..." text. I feel it should align with either one of these, perhaps in line with the service dropdown.
Screen Shot 2021-10-06 at 11 03 41 pm


I like the thoughtfulness of how the label appears on the side of the graph with the most real estate. A few things I wanted to point out (I can appreciate some of these can be quite tricky to implement, and also a little subjective, and so probably not critical for version 1):

  • I think the units would be helpful, either in the graph label or in the title (ms).
  • I feel that the percentiles in the label should be in reverse order: 95th first, then 75th and finally 50th. That way, the labels align more naturally to each line in the graph. At the moment, my brain needs to reverse the order of what I read in the label with what I see in the graph. :)
  • I prefer little dot markers highlighting the exact time point on each line where the vertical "cross-hair" is.
  • It would be nice to have the time markers at rounded times. For example, below, there's 23:23 then 23:31, but maybe it makes more sense to have say 23:20, 23:25 and 23:30 or even just 23:20 and 23:30.

Screen Shot 2021-10-06 at 11 41 56 pm

  • It would be great if we could see the specific time in the label as well, for example (from Grafana):

Screen Shot 2021-10-06 at 11 35 07 pm


It would be nice if the headers of the service-level and operation-level graphs are consistent:
Screen Shot 2021-10-06 at 11 04 56 pm


I tried clicking on the "View traces" button but it isn't able to select the Operation because the dropdown isn't populated on initial load, but only when I re-select "redis" again. Not sure if this is an existing bug in Jaeger UI. The service is definitely auto-selected, so I would have the Operations dropdown should be populated too.
Screen Shot 2021-10-06 at 11 10 46 pm


nit: If I click on the up-arrow and down-arrows of each column, it seems to have mixed behaviours between columns. Also, sometimes down-arrow toggles ascending and descending order, and sometimes it just sticks to descending order. It would be good if there was consistent behaviour across all the columns.
Screen Shot 2021-10-06 at 11 13 36 pm


nit: If I select 2 days lookback, it shows 48 hours which is correct, but would be nicer if it also shows "2 days" to be consistent with the selected lookback text.
Screen Shot 2021-10-06 at 11 16 32 pm


It would be good to include the units somewhere, perhaps in the label (req/s), as is done in the per operation table.
Screen Shot 2021-10-07 at 12 30 59 am

@albertteoh
Copy link
Contributor

We have a release going out today, but I think it's too late to include this, right?

Sorry, my bad for the slow turnaround on reviews to miss the release cut-off. Probably too late to make it for today's release.

@th3M1ke
Copy link
Contributor Author

th3M1ke commented Oct 28, 2021

The text in the "Impact" column's "info" is wrapping in the middle of words. It would be better to wrap on the word boundaries:
Screen Shot 2021-10-06 at 11 01 59 pm

Done

How will a user know what percentile the latency column is displaying? I'm assuming it's 95th percentile based on the colour scheme
Screen Shot 2021-10-06 at 11 02 10 pm

Units was added

The horizontal alignment for the lookback seems a little off from both the service dropdown and the "Aggregation of..." text. I feel it should align with either one of these, perhaps in line with the service dropdown.
Screen Shot 2021-10-06 at 11 03 41 pm

Fixed. Aligned with text

I like the thoughtfulness of how the label appears on the side of the graph with the most real estate. A few things I wanted to point out (I can appreciate some of these can be quite tricky to implement, and also a little subjective, and so probably not critical for version 1):

  • I think the units would be helpful, either in the graph label or in the title (ms).

done

  • I feel that the percentiles in the label should be in reverse order: 95th first, then 75th and finally 50th. That way, the labels align more naturally to each line in the graph. At the moment, my brain needs to reverse the order of what I read in the label with what I see in the graph. :)

done

  • I prefer little dot markers highlighting the exact time point on each line where the vertical "cross-hair" is.

unfortunately react-visdoes not provide this functionality 馃槥

  • It would be nice to have the time markers at rounded times. For example, below, there's 23:23 then 23:31, but maybe it makes more sense to have say 23:20, 23:25 and 23:30 or even just 23:20 and 23:30.
Screen Shot 2021-10-06 at 11 41 56 pm

cant find this functionality in react-vis

  • It would be great if we could see the specific time in the label as well, for example (from Grafana):
Screen Shot 2021-10-06 at 11 35 07 pm

done

It would be nice if the headers of the service-level and operation-level graphs are consistent:
Screen Shot 2021-10-06 at 11 04 56 pm

Done

I tried clicking on the "View traces" button but it isn't able to select the Operation because the dropdown isn't populated on initial load, but only when I re-select "redis" again. Not sure if this is an existing bug in Jaeger UI. The service is definitely auto-selected, so I would have the Operations dropdown should be populated too.
Screen Shot 2021-10-06 at 11 10 46 pm

This bug is not related to changes introduced in this PR. You can reproduce it if you search for some specific operation, copy generated URL and past it into incognito window

nit: If I click on the up-arrow and down-arrows of each column, it seems to have mixed behaviours between columns. Also, sometimes down-arrow toggles ascending and descending order, and sometimes it just sticks to descending order. It would be good if there was consistent behaviour across all the columns.
Screen Shot 2021-10-06 at 11 13 36 pm

This is library's(antd) behaviour

nit: If I select 2 days lookback, it shows 48 hours which is correct, but would be nicer if it also shows "2 days" to be consistent with the selected lookback text.
Screen Shot 2021-10-06 at 11 16 32 pm

Done.

It would be good to include the units somewhere, perhaps in the label (req/s), as is done in the per operation table.
Screen Shot 2021-10-07 at 12 30 59 am

Done

@albertteoh
Copy link
Contributor

albertteoh commented Oct 29, 2021

EDIT: I've clarified what I meant by inlining suggestions in code.

Thanks @th3M1ke! I have a few comments, but I think we can discuss/address them in a follow-up PR if it's too much effort to address here.

I feel that the percentiles in the label should be in reverse order: 95th first, then 75th and finally 50th. That way, the labels align more naturally to each line in the graph. At the moment, my brain needs to reverse the order of what I read in the label with what I see in the graph. :)

done

It looks like the percentile labels are still in ascending order.

Screen Shot 2021-10-29 at 11 28 17 pm

@albertteoh
Copy link
Contributor

Please rebase and address code coverage issues.

Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought it would be clearer to enter my suggestions directly inline to the code.

@th3M1ke th3M1ke force-pushed the atm-monitoring-ui branch 2 times, most recently from 9a86bb8 to d471027 Compare November 5, 2021 11:09
albertteoh
albertteoh previously approved these changes Nov 5, 2021
@albertteoh
Copy link
Contributor

CI jobs seem stuck. Closing and reopening PR to re-trigger build.

@albertteoh
Copy link
Contributor

Reopened PR to restart stuck build pipeline.

@th3M1ke th3M1ke force-pushed the atm-monitoring-ui branch 2 times, most recently from 784db4c to 0f52a3b Compare November 10, 2021 17:58
@th3M1ke th3M1ke closed this Nov 10, 2021
@th3M1ke th3M1ke reopened this Nov 10, 2021
@th3M1ke th3M1ke force-pushed the atm-monitoring-ui branch 3 times, most recently from d403411 to 79caab0 Compare November 12, 2021 12:45
Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 馃憤

When using the test setup in docker-compose/monitor I noticed that the HTTP GET operation was missing for the driver service in the monitor page, but present when I click on view traces. Do you know why?

Screen Shot 2021-11-13 at 11 25 16 am

Screen Shot 2021-11-13 at 11 24 48 am

@th3M1ke
Copy link
Contributor Author

th3M1ke commented Nov 15, 2021

Good catch, @albertteoh !

I've checked, but I don't know why I did not received it from jaeger-query...
Screenshot 2021-11-15 at 11 46 06

Request to get data is GET /api/metrics/latencies?service=driver&endTs=1636969517360&groupByOperation=true&lookback=7200000&quantile=0.95&ratePer=3600000&step=60000

Is it correct?

Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct?

Yeah, looks correct to me, it could be a bug on jaeger-query's side.
I've created a ticket for myself to investigate: jaegertracing/jaeger#3392

Signed-off-by: Mykhailo Semenchenko <mykhailo.semenchenko@logz.io>
Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@albertteoh albertteoh merged commit 9068a11 into jaegertracing:master Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants