-
Notifications
You must be signed in to change notification settings - Fork 510
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
(SPM) Add span kind selector #2012
(SPM) Add span kind selector #2012
Conversation
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2012 +/- ##
=======================================
Coverage 96.54% 96.55%
=======================================
Files 256 256
Lines 7613 7625 +12
Branches 1978 1982 +4
=======================================
+ Hits 7350 7362 +12
Misses 263 263 ☔ View full report in Codecov by Sentry. |
{ label: 'Client', value: 'client' }, | ||
{ label: 'Server', value: 'server' }, | ||
{ label: 'Internal', value: 'internal' }, | ||
{ label: 'Producer', value: 'producer' }, | ||
{ label: 'Consumer', value: 'consumer' }, |
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.
Label naming follows convention used by OpenTelemetry.
@@ -287,6 +304,31 @@ export class MonitorATMServicesViewImpl extends React.PureComponent<TPropsWithIn | |||
))} | |||
</Field> | |||
</Col> | |||
<Col span={6}> | |||
<h2 className="span-kind-selector-header">Choose kind</h2> |
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.
<h2 className="span-kind-selector-header">Choose kind</h2> | |
<h2 className="span-kind-selector-header">Span Kind</h2> |
Similarly, s/Choose service/Service/
in L287, using the word "choose" in the UX is redundant
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.
Removed "Choose" in: 07e3c26
}} | ||
props={{ | ||
className: 'span-kind-selector', | ||
defaultValue: spanKindOptions[0], |
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.
client?
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.
also, better not to depend on the array order.
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.
👍🏼 Done in: 46989de
export type MetricsAPIQueryParams = { | ||
quantile: number; | ||
groupByOperation?: boolean; | ||
endTs?: number; | ||
lookback?: number; | ||
step?: number; | ||
ratePer?: number; | ||
spanKind?: 'unspecified' | 'internal' | 'server' | 'client' | 'producer' | 'consumer'; | ||
spanKind?: spanKinds; |
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.
lots of optional fields here - are they really optional? Even if they are from the server perspective, wouldn't UI code always populate them?
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.
Hmmm.. yeah, not sure why it was done that way initially; removed optionality in: ccd6cc7.
@@ -361,6 +361,7 @@ describe('mapStateToProps()', () => { | |||
metrics: originInitialState, | |||
services: [], | |||
selectedService: 's1', | |||
selectedSpanKind: 'server', |
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.
do we have behavioral tests? It would be good to have tests simulating a change in span kind
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.
Yup, I could do better with test coverage; added behavioural tests in: 62a71da.
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Note that I've retitled this PR to use SPM instead of ATM because that's the acronym used in our documentation. If you're okay with that, do you think we should also do the same in our codebase? |
Yes we should use the same SPM name and clean up the code |
@@ -210,6 +225,7 @@ export class MonitorATMServicesViewImpl extends React.PureComponent<TPropsWithIn | |||
|
|||
if (currentService) { | |||
this.endTime = Date.now(); | |||
store.set('lastAtmSearchSpanKind', selectedSpanKind); |
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.
When we change this to SPM, a couple more improvements:
- use constants instead of raw strings
- keep abbreviations in uppercase, SPM not Spm (but constants should probably all be named in uppercase)
Thanks for the review! |
Which problem is this PR solving?
Description of the changes
How was this change tested?
Screen.Recording.2023-12-02.at.10.37.29.pm.mov
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test