-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat] Migrate Kubernetes state_container Metricset to use ReporterV2 interface #10858
[Metricbeat] Migrate Kubernetes state_container Metricset to use ReporterV2 interface #10858
Conversation
jenkins, test this please |
Error seems unrelaed in auditbeat |
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.
Not sure about the duplication of code, and could you also regenerate the data.json
file?
metricbeat/module/kubernetes/state_container/state_container_test.go
Outdated
Show resolved
Hide resolved
197a826
to
ff9030f
Compare
Is it possible to regenerate |
As we talked in a different conversation, we'll leave |
metricbeat/module/kubernetes/state_container/state_container.go
Outdated
Show resolved
Hide resolved
metricbeat/module/kubernetes/state_container/_meta/test/kube-state-metrics.expected
Outdated
Show resolved
Hide resolved
2b64d2b
to
0c7423b
Compare
095080a
to
c77efa1
Compare
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 glad you already started to use the new data test framework. It shows well that we need to do work on the _module magic.
...dule/kubernetes/state_container/_meta/testdata/kube-state-metrics.v1.3.0.plain-expected.json
Outdated
Show resolved
Hide resolved
27ad7c4
to
fb87a61
Compare
metricbeat/module/kubernetes/state_container/state_container.go
Outdated
Show resolved
Hide resolved
@sayden I think the CI failures are related. |
jenkins, test this please |
73719ab
to
e35f55e
Compare
jenkins, test this |
69e436c
to
c8dbbe3
Compare
c8dbbe3
to
e883bb0
Compare
jenkins, test this |
1 similar comment
jenkins, test this |
|
||
return events, err | ||
var moduleFieldsMapStr common.MapStr | ||
moduleFields, ok := event[mb.ModuleDataKey] |
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.
@odacremolbap I wonder if with your refactoring we will be able to remove this "trick".
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. Just to confirm: Metrics need to go under kubernetes.container
?
Very good question, thanks for asking! In I didn't understand this renaming very well and I was following the "approach" but, in this case, we also have a metricset called In pre V2 version, metrics go under |
For this PR, I would focus on having the metrics in the same place as before. So if they were in |
Ok, so merging. Do you want me to open an issue to discuss this collision? |
@sayden If you think there is some unexpected collision, please open one. |
Refer to #10774 for more info
Found a really ugly dependency with Prometheus that needed to upgrade also the Prometheus helper so I have removed the dependency by duplicating code.
We can make a follow up PR to "clean" that. But right now I must keep focused on the migration