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

[Infra UI] Use new snapshot endpoint #34938

Merged
merged 14 commits into from
Apr 30, 2019

Conversation

skh
Copy link
Contributor

@skh skh commented Apr 11, 2019

Summary

Second part of the implementation of #31405.

Changes the snapshot view to use the new snapshot graphql endpoint introduced in #34264 . Also, adds tests for this new endpoint, and removes the old nodes endpoint that is no longer used.

For testing I used the Observability 8.0.0-SNAPSHOT cluster. The main purpose of this change is that it is now possible for all node types to group by Service Type and see metrics in all groups:

image

During testing I noticed a bug in the waffle map where it's not possible to scroll to the top in certain situations:

image

I will look into this, but I can also reproduce it in master so it's not related to this change.

This has most likely been fixed by #34881

Checklist

- [ ] This was checked for cross-browser compatibility, including a check against IE11

- [ ] Documentation was added for features that require explanation or tutorials

- [ ] This was checked for keyboard-only and screenreader accessibility

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@skh skh force-pushed the infraui-use-snapshot-endpoint branch from 2113749 to d613e9c Compare April 23, 2019 10:08
@elasticmachine
Copy link
Contributor

💔 Build Failed

@skh skh force-pushed the infraui-use-snapshot-endpoint branch from 91962ed to 381ddfb Compare April 23, 2019 13:37
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@skh skh marked this pull request as ready for review April 25, 2019 11:01
@skh skh added the Feature:Metrics UI Metrics UI feature label Apr 25, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infrastructure-ui

@simianhacker simianhacker self-assigned this Apr 25, 2019
Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

Everything looks good except for one note I left about adding a -58s offset to the date_histogram aggregation. And...

@makwarth While I was playing around with the filtering and grouping I noticed this behavior:

waffle-map-filtering-behavior

@makwarth Is this the intended UX? Should the filtering be applied to the metric values? or just the groupings. In the Metric Explorer, I choose to only apply the filtering to the groupings but left the values separate. Either way we should make the behavior consistent across both.

@skh Let's wait for clarification from @makwarth

x-pack/plugins/infra/server/lib/snapshot/snapshot.ts Outdated Show resolved Hide resolved
@skh
Copy link
Contributor Author

skh commented Apr 26, 2019

Either way we should make the behavior consistent across both.

Good catch again, I agree the behaviour should be consistent, and the only way to always show metrics is to not apply the filter query on the metric values. The way it is now there's no way for the user to understand why the metric values go away from one click to the next.

@makwarth
Copy link

Good catch @simianhacker. I agree the filter shouldn't apply to the metric values.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@skh
Copy link
Contributor Author

skh commented Apr 26, 2019

@simianhacker Thanks for the review! This is ready for another look once CI is through.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@skh
Copy link
Contributor Author

skh commented Apr 26, 2019

For the sake of completeness, not applying the filter on the metrics query means we always query for the metrics of all nodes, which might become problematic in really large infrastructures.

We will need to tackle this once we start making the snapshot view more resilient. For now I think it would be premature optimization, but we shouldn't forget it.

@simianhacker simianhacker self-requested a review April 29, 2019 17:41
Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

Good job...

   ,--,                      ,----,               
,---.'|                    ,/   .`|        ____   
|   | :     ,----..      ,`   .'  :      ,'  , `. 
:   : |    /   /   \   ;    ;     /   ,-+-,.' _ | 
|   ' :   |   :     :.'___,/    ,' ,-+-. ;   , || 
;   ; '   .   |  ;. /|    :     | ,--.'|'   |  ;| 
'   | |__ .   ; /--` ;    |.';  ;|   |  ,', |  ': 
|   | :.'|;   | ;  __`----'  |  ||   | /  | |  || 
'   :    ;|   : |.' .'   '   :  ;'   | :  | :  |, 
|   |  ./ .   | '_.' :   |   |  ';   . |  ; |--'  
;   : ;   '   ; : \  |   '   :  ||   : |  | ,     
|   ,/    '   | '/  .'   ;   |.' |   : '  |/      
'---'     |   :    /     '---'   ;   | |`-'       
           \   \ .'              |   ;/           
            `---`                '---'            
                                                  

@skh skh merged commit 87b0fd1 into elastic:master Apr 30, 2019
skh added a commit to skh/kibana that referenced this pull request Apr 30, 2019
* Use new snapshot endpoint

* Remove old nodes endpoint

* Reintroduce NAME_FIELDS for displayable names.

* Use camelCase consistently.

* Distinguish node name and node id correctly.

* Adjust functional tests.

* Make prettier.

* Use exact same date histogram as before.

* Enable test for metric values again.

* Add test for new groupBy behaviour.

* Add 'Service Type' to groupBy fields.

* Fix date histogram offset and adjust tests.

* Always query for all metrics.
skh added a commit that referenced this pull request Apr 30, 2019
* Use new snapshot endpoint

* Remove old nodes endpoint

* Reintroduce NAME_FIELDS for displayable names.

* Use camelCase consistently.

* Distinguish node name and node id correctly.

* Adjust functional tests.

* Make prettier.

* Use exact same date histogram as before.

* Enable test for metric values again.

* Add test for new groupBy behaviour.

* Add 'Service Type' to groupBy fields.

* Fix date histogram offset and adjust tests.

* Always query for all metrics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants