-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Use force_synthetic_source in API tests #144300
Conversation
Pinging @elastic/apm-ui (Team:APM) |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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!
@@ -54,6 +54,7 @@ const configSchema = schema.object({ | |||
sourcemap: schema.string({ defaultValue: 'apm-*' }), | |||
onboarding: schema.string({ defaultValue: 'apm-*' }), | |||
}), | |||
forceSyntheticSource: schema.boolean({ defaultValue: false }), |
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.
If this needs to be a config maybe it's good to add it to the docs as well
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.
What docs? It's really only intended for us.
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.
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.
Ah I think it's OK to leave it out for now, it's developer only and I'm assuming we can get rid of it soon.
@@ -149,11 +152,18 @@ export class APMEventClient { | |||
this.indices | |||
); | |||
|
|||
const forceSyntheticSourceForThisRequest = | |||
this.forceSyntheticSource && | |||
params.apm.events.includes(ProcessorEvent.metric); |
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.
What happens to other non-metric events when this is enabled?
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.
If an index is not synthetic source-compatible, I assume it results in a shard failure, but only when actually fetching the documents. E.g., if size
is 0 or the top scoring documents are retrieved from compatible indices, it still works. I prefer this approach over only using force_synthetic_source
when only the metrics data stream is being queried, because this currently works, and I'd like to eliminate false positives over preventing false negatives. At least we get notified of the latter.
Closes #140255.
Adds a setting that, when true, tacks on
force_synthetic_source
for all requests that involve metric indices. This should help us prepare for synthetic source. The setting should only be used in API tests.