-
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 Dropwizard collector Metricset to use ReporterV2Error interface #11743
[Metricbeat] Migrate Dropwizard collector Metricset to use ReporterV2Error interface #11743
Conversation
"p99": 0, | ||
"p999": 0, | ||
"stddev": 0 | ||
"_namespace": "testnamespace", |
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.
This should not be here anymore I would assume?
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 thought that we could maintain it just for compatibility but I can remove it, of course.
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 don't think this was in the previous events.
} | ||
|
||
eventList := eventMapping(dw) | ||
|
||
// Converts hash list to slice | ||
events := []common.MapStr{} | ||
for _, event := range eventList { | ||
event[mb.NamespaceKey] = m.namespace |
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.
This line can probably be removed?
@@ -67,19 +71,14 @@ func TestFetch(t *testing.T) { | |||
} | |||
assert.Equal(t, hasTag, true) |
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.
Do we only need to check hasTag once after all for _, event := range events {} loops?
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.
Uhmmm 🤔 You are right. I'll leave it for a follow up PR, I'm looking forward to finish with the migration and this was like this already anyways 😅
|
||
t.Logf("%s/%s event: %+v", f.Module().Name(), f.Name(), events) | ||
} | ||
|
||
func TestData(t *testing.T) { | ||
compose.EnsureUp(t, "dropwizard") | ||
f := mbtest.NewReportingMetricSetV2Error(t, getConfig()) |
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.
Now that we have the new data generation, we could remove TestData
?
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.
Absolutely
Error is unrelated. Merging |
Refer to #10774 for more info