Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
EP Meta Telemetry Perf #104396
EP Meta Telemetry Perf #104396
Changes from 16 commits
52f8db9
f2757c5
763020f
cf0a7c7
4ad2672
f9291d2
3753c12
b9dde6d
76ae366
bbc6945
1b1b3cc
25b7bc4
d2189d8
dea2711
7cad599
a276838
7c6b7f4
6afef3a
65343d8
d783013
7877da2
dba608e
e451818
ea4e07e
d0cf37d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Just responding to your question from slack here, I know you didn't change this but yeah if you have time to make a few changes here that'd be great.
I believe it's possible for
endpointMetricsResponse
to beundefined
based on the return value of thethis.fetchEndpointData()
call. Below I think we can change theif
toif (endpointMetricsResponse?.aggregation
to address thatI think if we could remove the cast to
unknown
that'd be awesome. I think we can achieve that by adding something like this:As a side note it looks like
EndpointMetricsAggregation
might needtotal
I think that is already typed as part of theSearchResponse
type, so we might be able to get rid of that part.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.
Is the map just to cast the values, or should this be a filter of any null values? If the former could we just remove the map like below? Also, can the
pPolicy.inputs
array be empty or theconfig
null instead of undefined?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.
It is the former - I am just casting. There shouldn't be any null values (but anything is possible).
I haven't seen it - as these are package policies instead of agent policies I think they should always have an input. But I'm running with the assumption that it is possible.
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.
Would a reduce combining these two be easier? So:
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.
I think this is a great suggestion, but I prefer how my implementation reads by functional chaining. Hope that is ok :-)