modelindexer: introduce go-elasticsearch indexer#5970
Conversation
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errors
Expand 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
stuartnelson3
left a comment
There was a problem hiding this comment.
looking really good!
Don't let flushing block Close. Add a context param to Close; when it is cancelled, cancel any ongoing flush attempts.
simitt
left a comment
There was a problem hiding this comment.
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.
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.
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 <axw@elastic.co>
|
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=trueThis 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=trueRelated issues
#6002