Hi Hamid,
Thanks for creating the issue.
So for RUM usage, we basically have the normal page load and transactions. I would define transactions as something normally user-initiated or triggered. It makes sense to wrap a transaction flow in between a .startTransaction() and a transaction.end() and let the RUM agent take care of all the data collection and enrichment.
However, there are sometimes use cases where we'd like RUM metric for non-user triggered events. As an example, we have a web page used by back office operators that displays the number of open tickets that get updated every 60 seconds via an XMLHttpRequest. It also displays other data requested by other XMLHttpRequests at regular intervals or event-triggered. These pages rarely get refreshed or closed. We have an internal instrumentation that measures the request time, and captures the result for each of these roundtrips then stores these in an array. We'd like to have a way to send those collected instrumentation data to the APM server via a single .sendMetrics(object) on our own pre-determined triggers, each metric object can be something like an array of {"transaction.name":"transaction_name","transaction.duration":duration_in_microseconds,"transaction.type":"some_transaction_type"} . We do not see the need of having to wrap those metrics in a .startTransaction()-.end() transaction. At the moment, we have to put those in tags and then create a way to handle those tags into transactions.