-
Notifications
You must be signed in to change notification settings - Fork 525
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
modelindexer: introduce go-elasticsearch indexer #5970
Conversation
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
be2c558
to
2ca39f7
Compare
8943471
to
0aeebb2
Compare
a00c818
to
9ac9844
Compare
266196b
to
0320bae
Compare
publish (libbeat):
modelindexer:
|
f2a07a3
to
66b59df
Compare
Introduce an experimental option to index events using go-elasticsearch, bypassing libbeat.
66b59df
to
6f7fb2b
Compare
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.
looking really good!
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.
Looks great!
Don't let flushing block Close. Add a context param to Close; when it is cancelled, cancel any ongoing flush attempts.
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 loooks great!
Tested a bit with standalone+data streams and also when running managed by agents, didn't observe any obvious issues.
var eventsFailed int64 | ||
for _, item := range resp.Items { | ||
for _, info := range item { | ||
if info.Error.Type != "" || info.Status > 201 { |
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.
Not certain we need this, but libbeat did check for status < 500
per event, before calling an event nonIndexable and dropping it.
Maybe for later, libbeat just recently introduced sending events that can't be indexed to a dead letter index (if configured).
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.
Yeah I think I'll defer these kinds of things, I'd like to get this merged so we can test out the basics first.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
* modelindexer: introduce go-elasticsearch indexer Introduce an experimental option to index events using go-elasticsearch, bypassing libbeat. (cherry picked from commit aa4f76a) # Conflicts: # changelogs/head.asciidoc
… (#6317) * modelindexer: introduce go-elasticsearch indexer (#5970) * modelindexer: introduce go-elasticsearch indexer Introduce an experimental option to index events using go-elasticsearch, bypassing libbeat. (cherry picked from commit aa4f76a) # Conflicts: # changelogs/head.asciidoc * Delete head.asciidoc Co-authored-by: Andrew Wilkins <[email protected]>
Confirmed with BC3 |
Motivation/summary
Introduce an experimental option to index events using go-elasticsearch, bypassing libbeat. This only works when data streams are enabled. You can enable the experimental indexer with:
apm-server -E output.elasticsearch.experimental=true -E apm-server.data_streams.enabled=true
This approach aligns with how we want to evolve apm-server output tuning: moving away from the current libbeat queue and output configuration, simplifying config to be similar to how APM Agents are configured: bulk requests are now executed either after some time elapses (
output.elasticsearch.flush_interval
, defaults to1s
) or if a number of bytes is reached (output.elasticsearch.flush_bytes
, defaults to5MB
).We have temporarily forked the go-elasticsearch bulk-indexer. See comments in the code for rationale.
Some libbeat metrics are faked, so this output works with stack monitoring and other existing uses of libbeat metrics. We should consider removing "libbeat" from our metric names and standardising on those, so we are not locked into a particular technology.
Checklist
- [ ] Documentation has been updatedHow to test these changes
-E output.elasticsearch.experimental=true -E apm-server.data_streams.enabled=true
Related issues
#6002