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

NETOBSERV-287 Aggregate stats, fix limit reach #136

Merged
merged 2 commits into from
May 4, 2022

Conversation

jotak
Copy link
Member

@jotak jotak commented Apr 27, 2022

  • Stats are now aggregated in backend (needed when multiple queries are performed)
  • Add a few tests
  • On the frontend, limit reached now comes as a stats provided from
    backend
  • Add info tooltip on limit setting, to clarify it's the limit per loki
    query, so we may end up with more flows than this limit

@jotak jotak requested a review from jpinsonneau April 27, 2022 15:20
Copy link
Contributor

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

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

Can't access to topology view anymore:

Unable to get topology
TypeError: Cannot read properties of undefined (reading 'result')

It would be great to show stats as JSON in the summary panel. Feel free to create a followup task if you prefer.

Comment on lines +22 to +27
const aggQR: AggregatedQueryResponse = r.data;
return {
records: (aggQR.result as StreamResult[]).flatMap(r => parseStream(r)),
stats: aggQR.stats
};
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 do the same logic in getTopology

Copy link
Contributor

Choose a reason for hiding this comment

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

return (r.data.data.result as TopologyMetrics[]) needs to be return (r.data.result as TopologyMetrics[])

Comment on lines +202 to +205
.then(result => {
setFlows(result.records);
setStats(result.stats);
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Also update case 'topology': below

- Stats are now aggregated in backend (needed when multiple queries are performed)
- Add a few tests
- On the frontend, limit reached now comes as a stats provided from
  backend
- Add info tooltip on limit setting, to clarify it's the limit per loki
  query, so we may end up with more flows than this limit
@jotak
Copy link
Member Author

jotak commented Apr 29, 2022

Thanks, yeah I forgot about topology on the frontend, should be fixed now.

Copy link
Contributor

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jotak !

@openshift-ci openshift-ci bot added the lgtm label Apr 29, 2022
@jotak
Copy link
Member Author

jotak commented Apr 29, 2022

thanks Julien
holding for pending release
/hold

@jotak
Copy link
Member Author

jotak commented May 4, 2022

/unhold
/approve

@openshift-ci
Copy link

openshift-ci bot commented May 4, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jotak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label May 4, 2022
@openshift-merge-robot openshift-merge-robot merged commit 36e872e into netobserv:main May 4, 2022
@jotak jotak deleted the aggregate-stats branch November 7, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants