-
Notifications
You must be signed in to change notification settings - Fork 177
chore: Modernize the Presto Mixin #1491
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
base: master
Are you sure you want to change the base?
Conversation
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.
Layout and structurally looks great to me, just a few panels I think that we can safely convert over to use the premade common-lib components
| coordinatorNonheapMemoryUsage: | ||
| g.panel.gauge.new('Non-heap memory usage') | ||
| + g.panel.gauge.queryOptions.withTargets(signals.coordinator.nonheapMemoryUsage.asTarget()) | ||
| + g.panel.gauge.panelOptions.withDescription('Non-heap memory usage') | ||
| + g.panel.gauge.standardOptions.withUnit('percentunit') | ||
| + g.panel.gauge.standardOptions.thresholds.withSteps([ | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-green') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('#EAB839') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.7), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-red') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.8), | ||
| ]), | ||
|
|
||
| coordinatorHeapMemoryUsage: | ||
| g.panel.gauge.new('Heap memory usage') | ||
| + g.panel.gauge.queryOptions.withTargets(signals.coordinator.heapMemoryUsage.asTarget()) | ||
| + g.panel.gauge.panelOptions.withDescription('Heap memory usage') | ||
| + g.panel.gauge.standardOptions.thresholds.withSteps([ | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-green') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('#EAB839') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.7), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-red') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.8), | ||
| ]) | ||
| + g.panel.gauge.standardOptions.withUnit('percentunit'), |
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 you update these to use the common-lib memory panels?
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.
@Dasomeone looking into this more, but just confirming are we moving away from the gauge panel here in favor of a stat?
commonlib.panels.memory.stat.usage.new()
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.
Oh hmm that's a good point. I think there's a case to be made for either. I do prefer the gauge for this actually, so apologies for suggesting that.
I think in fact we could make a case for adding a good common-lib gauge with standard settings, so for now we can keep this as-is!
Again, apologies 😅
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.
LGTM, thank you for the pointer on the memory stat panels, the gauge does indeed look better for this usecase
| coordinatorNonheapMemoryUsage: | ||
| g.panel.gauge.new('Non-heap memory usage') | ||
| + g.panel.gauge.queryOptions.withTargets(signals.coordinator.nonheapMemoryUsage.asTarget()) | ||
| + g.panel.gauge.panelOptions.withDescription('Non-heap memory usage') | ||
| + g.panel.gauge.standardOptions.withUnit('percentunit') | ||
| + g.panel.gauge.standardOptions.thresholds.withSteps([ | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-green') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('#EAB839') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.7), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-red') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.8), | ||
| ]), | ||
|
|
||
| coordinatorHeapMemoryUsage: | ||
| g.panel.gauge.new('Heap memory usage') | ||
| + g.panel.gauge.queryOptions.withTargets(signals.coordinator.heapMemoryUsage.asTarget()) | ||
| + g.panel.gauge.panelOptions.withDescription('Heap memory usage') | ||
| + g.panel.gauge.standardOptions.thresholds.withSteps([ | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-green') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('#EAB839') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.7), | ||
| g.panel.gauge.standardOptions.threshold.step.withColor('light-red') | ||
| + g.panel.gauge.standardOptions.threshold.step.withValue(0.8), | ||
| ]) | ||
| + g.panel.gauge.standardOptions.withUnit('percentunit'), |
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.
Oh hmm that's a good point. I think there's a case to be made for either. I do prefer the gauge for this actually, so apologies for suggesting that.
I think in fact we could make a case for adding a good common-lib gauge with standard settings, so for now we can keep this as-is!
Again, apologies 😅


Presto overview:
Presto coordinator:
Presto worker:


Presto logs:
