APM Agent language and version : elastic/apm-rum@5.30.0
Browser version : google chrome 84.0.4147.105
Original install method (e.g. download page, yum, deb, from source, etc.) and version : npm
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant) :
Hi Guys, I need to create a track button. This button must sometimes handle with events http are request It has traceparent in your header. I need to send to apm-server one transaction with the name button in one transaction type call buttons. I want to know How I track any event http and handle only after the conclussion event http. Is there some tutorial for this? I need like this print:
Im trying to use apm.observe with transaction:end inside the useEffect in the button. However, When I created one transaction with startTransaction and I called transactions.end() it doesnt work, it doesnt call events api.
If you do want to replicate this behaviour, you can use the API startTransaction and create the click transactions manually.
button.addEventListener('click', () => {
const tr = apm.startTransaction('button-click', 'user-interaction');
// do something which requests the http call which would be captured as span as part of the
// click transaction
tr.end()
})
My question is: How do i send the traceId of the variable tras in this transaction? I want to add this previous traceId in current transaction to create the timeline with traceId first request http.
The another question: You telled me APM JS does automatically tracks all click user interactions, but, how can I add one name for this transaction?Currently it is like this Click - body.
Other question is: the user-interaction can automatically tracks the events http trigger by himself ?
how can I add one name for this transaction?Currently it is like this Click - body .
You can observe for the transaction:end event as per your example and change the transaction name before the transaction events are reported to the server.
Other question is: the user-interaction can automatically tracks the events http trigger by himself ?
Its the other way around, Assume a user clicks on navigation menu of an e-commerce website, that click will render a new page issuing few HTTP requests. In this case, the RUM agent would capture all the information under Click-<button name> transaction and include all of the network activity ( HTTP requests, Resource requests) as spans for this transaction.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.