Skip to content

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

Merged
sayden merged 4 commits intoelastic:masterfrom
sayden:migration/mb/reporterv2error/dropwizard
Apr 11, 2019
Merged

[Metricbeat] Migrate Dropwizard collector Metricset to use ReporterV2Error interface#11743
sayden merged 4 commits intoelastic:masterfrom
sayden:migration/mb/reporterv2error/dropwizard

Conversation

@sayden
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

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.

// Converts hash list to slice
events := []common.MapStr{}
for _, event := range eventList {
event[mb.NamespaceKey] = m.namespace
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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 😅


func TestData(t *testing.T) {
compose.EnsureUp(t, "dropwizard")
f := mbtest.NewReportingMetricSetV2Error(t, getConfig())
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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