-
Notifications
You must be signed in to change notification settings - Fork 0
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
[APM] Only show relevant service legends #4
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,4 @@ | |
import { Span } from './Span'; | ||
import { Transaction } from './Transaction'; | ||
|
||
export interface WaterfallResponse { | ||
services: string[]; | ||
hits: Array<Transaction | Span>; | ||
} | ||
export type WaterfallResponse = Array<Transaction | Span>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh wow I only now realize how much more I like this 👏 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! This change was so easy to make. I just updated this interface, and then the compiler guided me through the rest. I find myself writing code without ever running it in the browser - until I push. |
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.
could just use the lodash
map
herereturn uniq(map(items, 'serviceName'))
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.
Call me old fashioned but for equivalent methods (map, filter, reduce, find etc.) I always prefer native. Especially after advent of ES6 arrow syntax I'm no longer as envious of lodash' iteratee shorthand.
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.
Any reason I should reconsider?
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.
in most browsers, lodash map is much more performant than native map
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.
this was true for past versions of browsers, but it seems that recent versions are catching up in the benchmarks (https://jsperf.com/native-map-vs-lodash-map/10)
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.
Yeah browsers improve - Lodash does not. I know... that's a controversial statement :p
But Kibana is still stuck on Lodash 3 while users are free to run evergreen browsers.
Regardless, I doubt any speed difference is noticeable for the end user in this case :)
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.
too true 💯