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

[Metricbeat] Migrate Dropwizard collector Metricset to use ReporterV2Error interface #11743

Merged
merged 4 commits into from
Apr 11, 2019

Conversation

sayden
Copy link
Contributor

@sayden sayden commented Apr 10, 2019

Refer to #10774 for more info

@sayden sayden added review Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Apr 10, 2019
@sayden sayden requested a review from a team as a code owner April 10, 2019 12:42
@sayden sayden self-assigned this Apr 10, 2019
"p99": 0,
"p999": 0,
"stddev": 0
"_namespace": "testnamespace",
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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
Copy link
Member

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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())
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely

@sayden
Copy link
Contributor Author

sayden commented Apr 11, 2019

Error is unrelated. Merging

@sayden sayden merged commit c6f3a09 into elastic:master Apr 11, 2019
@sayden sayden deleted the migration/mb/reporterv2error/dropwizard branch December 18, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Metricbeat Metricbeat review Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants