-
Notifications
You must be signed in to change notification settings - Fork 524
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
[RUM] Payload optimisation for the RUM agent #2854
Comments
After our discussion. We did an experiment with keeping the format same as NDJSON and only applying the field level compression on the payload. The wins are pretty similar. Check the result here https://github.com/vigneshshanmugam/rum-agent-payload#alternative-strategy |
All done! Let me know if something else comes up. |
What documentation updates should be considered for this change? For example, I'm looking at our Events intake API docs and notice that we still reference What about the example request body? Should we include https://github.com/elastic/apm-server/blob/master/docs/data/intake-api/generated/rum_v3_events.ndjson? Let me know if there's anything else I'm missing and I'll open a PR. |
@bmorelli25 The RUM agent has a configuration May be we can link to the RUM documentation and include side by side of how they fields are compressed? Just an idea though or we can not update anything and just keep the request body as is. |
I like that idea. How would I be able to generate that side-by-side comparison? I only see a generated/rum_v3_events.ndjson file. |
FWIW, I don't think it's particularly important to fully define the RUM v3 API in our docs. Maybe I'm wrong, but I think the likelihood of external folks developing against that API vs. the existing one are pretty minimal. |
Full mappings from V2 to V3 - https://github.com/elastic/apm-server/blob/master/model/modeldecoder/field/rum_v3_mapping.go#L20-L125 I agree with @axw comments, the likelihood of external folks developing would be pretty minimal. But we can also link the V3 spec mappings to let others know that there is a possibility of doing this to reduce the bandwidth consumption. |
In the RUM agent, we are experimenting with optimising the payload that is sent to the APM server. Currently we have done some prototypes which you can find in the repo here - https://github.com/vigneshshanmugam/rum-agent-payload
We have planned to do these changes in two steps
Phase 1
Phase 2
transaction
tot
in the top level and constructing spans as tries.We are working on a proposal doc at the moment, but the repo already contains some numbers for the phase 1 which would already get close to 50% improvement from the current release.
Update 12/03 (Juan)
Update 17/04 (Juan)
Recap of some relevant design decisions taken:
All marks and metricset fields are shortened. Any field not in the spec will be ignored (not indexed, but not rejected either).
Spans are embedded inside transactions.
trace_id
andtransaction_id
have been removed from spans. Instead ofparentId
, there is a "parentIndex" (shortened topi
) which refers to the index of the parent span in the span list. If missing, the parent is the transaction.Issues
The text was updated successfully, but these errors were encountered: