-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Control http-request transactions of APM RUM agent manually #129624
Comments
Pinging @elastic/kibana-core (Team:Core) |
Hi @mshustov, In the part of the code where you perform the http requests you can do something like:
In this link there is another example By the way, If a http request causes the browser to load a new html portion (which includes resources such as css, etc) and you want the agent to include timing information and spans about it in the transaction, you should create the transaction with the flag managed set to true and the agent will handle it automatically. We call this "custom managed transaction", more info here Thanks, |
If we did this, would we still be able to measure |
Assets loaded by js (for example, bundle chunks loaded by |
Actually, we already control the |
If the intention here is to separate API calls happening between client and server in to its own transactions, then the manual transaction is the only way to do it as the RUM agent tries to group all of them together if it can to a specific user activity.
We can capture all the network requests associated with the transaction even when we are doing the manual instrumentation. The instrumentation would give us the ability to start/end transaction at arbitrary intervals but also provide the option to capture the underlying network requests.
Let us know if this works. |
Had discussion with Liza and posting back from slack thread - https://elastic.slack.com/archives/C017DFNCV5H/p1649692286349239?thread_ts=1649167476.656889&cid=C017DFNCV5H
Before we jump in to solutions, Let's understand the intention, because we might be overthinking on how transactions in the browser and Kibana server works. In the RUM agent, everything is tied to a specific user activity. Transactions is just a APM term that is used to group them as we can get away without building a dedicated UI specific to RUM. In the backend agents these are different entities. There are multiple phases in the frontend
We have the grouping done at the If the intention is to separate all the outgoing API calls as individual transactions, then we are using the RUM agent in a wrong way for the particular use-case. TLDR: In the client, We need to consider everything as a |
@mshustov can we close this issue? |
Closing. We discussed using an approach combining APM traces with #121992 to get the benchmarking we need. |
Performance WG relies on the APM agent to capture traffic between the Kibana browser app and the Kibana server. During the APM transaction tree analysis, we noticed that some AJAX requests or static assets loading might be marked as a child of other AJAX requests.
@vigneshshanmugam explained this as the normal behavior of the RUM agent and suggested to use manual instrumentation instead of the automatic one.
@devcorpio suggested to disable automatic instrumentation for AJAX requests with disableInstrumentations config option.
To have the correct transaction tree we need:
The text was updated successfully, but these errors were encountered: