-
Notifications
You must be signed in to change notification settings - Fork 526
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
Decoder integrate #4261
Decoder integrate #4261
Conversation
jenkins run hey-apm tests please |
I didn't manage to trigger Jenkins to run hey-apm tests, so here are some preliminary local tests. Results show less improvement than microbenchmark (which is expected as different events are sent by hey-apm). |
4e94a87
to
fb94786
Compare
* change stream processor logic * adapt package tests * adapt decoder to be able to read ahaed for idenitying event type
fb94786
to
6a6e2d1
Compare
Jenkins, run the tests again please |
* sourcemaps: Add RUM information to config for accurate sourcemapping * uppercase method names * fix experimental
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's a bunch of things to look into here, but nothing critical as far as I can see. They can mostly be handled in follow-ups. Otherwise LGTM - I'm excited to get this in!
A couple of things I'd like you to look at before merging is the change in error code for beater/api/profile/handler_test.go
, and the change in number of accepted items in the ReadError test. I think the latter is probably due to the "ReadAhead" call, but not 100% sure.
beater/api/intake/test_approved/InvalidJSONMetadata.approved.json
Outdated
Show resolved
Hide resolved
processor/stream/test_approved_stream_result/testIntegrationResultInvalidMetadata.approved.json
Outdated
Show resolved
Hide resolved
processor/stream/test_approved_stream_result/testIntegrationResultReadError.approved.json
Show resolved
Hide resolved
@axw once again, thanks for the review.
I addressed both of them, let me know what you think. Still need to figure out the failing go |
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, thank you!
Yeah, that's going to be tricky, we would need to either run the validation directly on the decoding (which I avoided to make it easier to switch between different decoders - e.g. simdjson in the future); or we would need to also introduce a state that checks whether or not a struct was set, similar to what I do with IsSet() in the nullable package. I started out with something like that, but it also gets confusing easily, e.g. for semantic difference of nil, not set, zero etc. and how this should be reflected on the input models.
Right, fair enough. I was thinking we could update a bitset during decoding, and check that in validation. Likely a fair bit of work for marginal gain, so not high priority at all.
response.LimitedAdd(&Error{ | ||
Type: InvalidInputErrType, | ||
Message: err.Error(), | ||
Message: errors.Wrap(ErrUnrecognizedObject, eventType).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.
No big deal, but it would be less of an awkward error message if ErrUnrecognizedObject were a type, with the event type as a field: "did not recognize object type: invalid-json" vs. "invalid-json: did not recognize object type"
Do not reuse slices of input models.
This reverts commit 9ad6010.
Jenkins, run hey-apm tests please |
jenkins run the hey-apm tests please |
…lastic#4261) * change stream processor logic * adapt package tests * adapt decoder to be able to read ahaed for identifying event type * add RUM information in stream processor for accurate sourcemapping * Allow empty lines for backwards compatibility * Add changelog for error messages on Intake API
…4261) (#4270) * change stream processor logic * adapt package tests * adapt decoder to be able to read ahaed for identifying event type * add RUM information in stream processor for accurate sourcemapping * Allow empty lines for backwards compatibility * Add changelog for error messages on Intake API
jenkins run the hey-apm tests please |
finally got some results on allocations:
|
Motivation/summary
This PR integrates the previous work for creating the modeldecoders for
backend
andrum
v2
events.It does not integrate the new decoders for
rumv3
.I created the PR as draft PR as it is based off of #4259, therefore the reviewer can ignore the first three commits and focus on the commits starting with (9106eff).
Apart from the unmerged base this PR is ready for review.
Checklist
- [ ] I have signed the Contributor License Agreement.- [ ] I have updated CHANGELOG.asciidocI have considered changes for:
- [ ] documentation- [ ] logging (add log lines, choose appropriate log selector, etc.)- [ ] metrics and monitoring (create issue for Kibana team to add metrics to visualizations, e.g. [Kibana#44001](elastic/kibana#44001))- [ ] telemetry- [ ] Elasticsearch Service (https://cloud.elastic.co)- [ ] Elastic Cloud Enterprise (https://www.elastic.co/products/ece)- [ ] Elastic Cloud on Kubernetes (https://www.elastic.co/elastic-cloud-kubernetes)How to test these changes
run
make test
to ensure all tests are still workingBenchmark results
comparing results from
elastic/master
with this branch forprocessor.stream.BenchmarkBackendProcessor
:Speed
Memory
Hey-APM benchmarks
see #4261 (comment)
Related issues
related to #3551