-
Notifications
You must be signed in to change notification settings - Fork 898
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
Introduce: supports :capture #15194
Introduce: supports :capture #15194
Conversation
app/models/metric/ci_mixin.rb
Outdated
@@ -1,5 +1,6 @@ | |||
module Metric::CiMixin | |||
extend ActiveSupport::Concern | |||
include SupportsFeatureMixin |
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 for modules you have to include it like https://github.com/isimluk/manageiq/blob/69901b69264cb03705514e126f8898955b129cc1/app/models/mixins/event_mixin.rb
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.
unless, every module that this mixin includes already has the SupportsFeatureMixin
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 see, I got away of this include
.
Instead, I made sure (in first commit) that everything that includes CiMixin
includes the SupportsFeatureMixin
as well.
I already fought this battle and just resorted to |
@djberg96 good point |
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'm 👍 with it.
@djberg96 @moolitayer any concerns?
@durandom, @lpichler thinks that I could do better than hardcoding scvmm false. So, I come-up with
That works perfect for things that actually run capture. However, it will not work for ContainerProject, MiqEnterprise, or Zone. That do not capture stuff, they just get metrics_rolups. So the option is to rename |
How do you plan to use these? are the metrics collector workers the ones adding perf_capture* ? The distinction between :capture and :metrics makes sense. |
@moolitayer I planned to use it like shown at 43bf24a but not starting the capture worker would be even better, I'll look into it. |
This pull request is not mergeable. Please rebase and repush. |
@lpichler It's pity you were so demanding. 😿 Now we have merge conflict and the question that is unanswered for 12 days. Soon this will be closed as a stale pr. :-) |
So, I went with the second solution (and that avoids the conflict) |
@@ -1,5 +1,6 @@ | |||
class ContainerService < ApplicationRecord | |||
include CustomAttributeMixin | |||
include SupportsFeatureMixin |
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'm not sure why this is here?
As far as I know we should collect metrics on container entities if the associated ext has a metrics endpoint
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.
ContainerService
include CiMixin
that uses SupportsFeatureMixin
.
The included do
of CiMixin
will fail on supports :capture
unless the supports
means something.
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.
How come I can't see the include like in the other classes? Is that transitive in some way?
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.
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 sorry I missed that (I'm on a mobile device)
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.
No problem. I remember I missed that too first time. :-D
Checked commits isimluk/manageiq@8e7f063~...ec19fba with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/mixins/supports_feature_mixin.rb
|
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
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.
Should those of us who used |
Not sure. I think metrics, events and timelines are different. Guess this has to be solved from a usage perspective. |
What
Not all providers support metrics :capture. 📊
Currently we cannot tell, so we put perf_capture* into MiqQueue for whatever user has tagged. Putting everything on queue is unfortunate. It kills performance.
Note: This fixes first part of #15193.
Why?
Currently we fail horribly when you tag your scvmm/hyper for C&U capture.
Wait, why did the C&U fail for SCVMM?
It fails at
manageiq/app/models/metric/ci_mixin/capture.rb
Line 3 in 568ff20