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

[APM] Fix missing ML data, and NaN issue #34333

Merged
merged 4 commits into from
Apr 2, 2019

Conversation

sorenlouv
Copy link
Member

Closes #27868
Closes #34294

@sorenlouv sorenlouv requested a review from a team as a code owner April 2, 2019 07:27
Copy link
Contributor

@formgeist formgeist left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💔 Build Failed

console.log({ apmIndices, indexParam });
if (isString(indexParam)) {
return apmIndices.includes(indexParam);
} else if (Array.isArray(indexParam)) {
Copy link
Member

Choose a reason for hiding this comment

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

When is this an array? And can it be an array of mixed (some apm and some non-apm)? Just wondering if that would end up breaking the UI with 6.x apm data leaking in…

Copy link
Member Author

@sorenlouv sorenlouv Apr 2, 2019

Choose a reason for hiding this comment

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

When is this an array?

It's an array when we want to query multiple indices, like here:

index: [
config.get<string>('apm_oss.errorIndices'),
config.get<string>('apm_oss.transactionIndices')
],

And can it be an array of mixed (some apm and some non-apm)?

We don't do that atm, and I don't think we will. That being said, I added a test for this exact scenario, and if any of the indices are not apm indices we will not add the filter. In that case 6.x data will leak in, but I think we'll have to cross that bridge when we get there. I don't know how else to do this, so unless you have another solution that takes that into account, I think we can leave it at that.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, the only thing I can think is to throw an error here if the indices are mixed, to alert us on the first time we try to do that so we remember this caveat. But that may be overkill if we expect this problem to sort of disappear as we get further and further past the 7.0 release...

Copy link
Member Author

Choose a reason for hiding this comment

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

Throwing an exception for mixed arrays would add additional logic - I'd prefer to not do that atm.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@sorenlouv sorenlouv force-pushed the fix-nan-and-ml-issue branch from ffd1a9f to 2fd0960 Compare April 2, 2019 12:56
@elasticmachine
Copy link
Contributor

💔 Build Failed

@sorenlouv
Copy link
Member Author

retest

1 similar comment
@sorenlouv
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@jasonrhodes jasonrhodes left a comment

Choose a reason for hiding this comment

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

LGTM

@sorenlouv sorenlouv merged commit 949a267 into elastic:master Apr 2, 2019
@sorenlouv sorenlouv deleted the fix-nan-and-ml-issue branch April 2, 2019 14:41
sorenlouv added a commit to sorenlouv/kibana that referenced this pull request Apr 2, 2019
sorenlouv added a commit to sorenlouv/kibana that referenced this pull request Apr 2, 2019
# Conflicts:
#	x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts
#	x-pack/plugins/apm/server/lib/helpers/setup_request.ts
sorenlouv added a commit that referenced this pull request Apr 2, 2019
# Conflicts:
#	x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts
#	x-pack/plugins/apm/server/lib/helpers/setup_request.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants