-
Notifications
You must be signed in to change notification settings - Fork 529
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
Revise wait_for_integration ES implementation #12150
Conversation
Instead of polling Elasticsearch for the presence of index templates, attempt to create a data stream; this will fail if there is no index template with a matching index pattern. This decouples apm-server from the integration package, and will enable apm-server to alternatively work with the apm-data ES plugin. Instead of eagerly checking the preconditions (which includes making these attempts to create a data stream), we now delay the checks to the first attempt to index/publish events. This means that the "publish_ready" attribute of the server info API response will always be false until the first time events are sent to apm-server.
c7a56e5
to
d9cfe5b
Compare
This pull request does not have a backport label. Could you fix it @axw? 🙏
NOTE: |
@@ -889,7 +899,13 @@ func (s *Runner) newLibbeatFinalBatchProcessor( | |||
} | |||
return acker.Wait(ctx) | |||
} | |||
return publisher, stop, nil | |||
processor := modelprocessor.Chained{ | |||
modelpb.ProcessBatchFunc(func(ctx context.Context, batch *modelpb.Batch) error { |
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.
question: what's the reason for this ? Isn't this handled by the es client ?
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 one is for libbeat outputs, which is anything other than Elasticsearch.
This reverts commit 3e54384.
Removing the test label, as this has been reverted in #12240 |
…" (backport #12240) (#12249) * Revert "Revise wait_for_integration ES implementation (#12150)" (#12240) This reverts commit 3e54384. (cherry picked from commit 54e367c) # Conflicts: # internal/beater/checkintegration.go * Fix merge conflict --------- Co-authored-by: Andrew Wilkins <[email protected]>
…lease-process * upstream/main: Remove Nassim Kammah from list of maintainers (elastic#12269) docs: Add tagged regions to changelog (elastic#12251) Update apm data (elastic#12242) Revert "Revise wait_for_integration ES implementation (elastic#12150)" (elastic#12240)
…r-elastic * upstream/main: [updatecli] Bump elastic stack version to 8.13.0-yufkxnwm (elastic#12246) Remove Nassim Kammah from list of maintainers (elastic#12269) docs: Add tagged regions to changelog (elastic#12251) Update apm data (elastic#12242) Revert "Revise wait_for_integration ES implementation (elastic#12150)" (elastic#12240) ci(release): automate release steps (elastic#12234) build(deps): bump the github-actions group with 1 update (elastic#12232) [updatecli] Update to elastic/beats@a633696068ed (elastic#12164) [updatecli] Bump elastic stack version to 8.13.0-h30gube9 (elastic#12235) smoke-test: semver sort latest versions (elastic#12229) [updatecli] Bump Golang version to 1.21.5 (elastic#12191) fix: always try to remap both span and error stacktraces (elastic#12221) [updatecli] Bump elastic stack version to 8.13.0-6av99u5d (elastic#12169) docs: Update changelogs for 8.12 release (elastic#12172)
Motivation/summary
Instead of polling Elasticsearch for the presence of index templates, attempt to create a data stream; this will fail if there is no index template with a matching index pattern. This decouples apm-server from the integration package, and will enable apm-server to alternatively work with the apm-data ES plugin.
Instead of eagerly checking the preconditions (which includes making these attempts to create a data stream), we now delay the checks to the first attempt to index/publish events. This means that the "publish_ready" attribute of the server info API response will always be false until the first time events are sent to apm-server.
Checklist
- [ ] Update package changelog.yml (only if changes toapmpackage
have been made)- [ ] Documentation has been updatedHow to test these changes
Related issues
#11528