When there is a fetch request on button click the apm agent starts a transaction of type user-interaction. When the button clicks starts an HTTP requests the request is added as span to the user-interaction transaction instead of starting a new transaction of type http-request. I could disable automatic user-interaction instrumentation but I was wondering why it acts like that. This request won't be included in the http-request overview in Kibana and could give a wrong view, not?
The behaviour you described is intended. Please see this post for more details
TL;DR:
http requests = fetch, xhr
http requests that take place within the page-load will be associated to the page-load transaction
http requests that take place after a user action will be associated to the user-interaction / route-change transaction generated by that action
http requests not associated to page-load nor user actions (e.g. healthchecks, pings, polling of some kind, requests from other third-party tools, etc) will have their own transaction (which type will be http-request)
When there is a fetch request on button click the apm agent starts a transaction of type user-interaction. When the button clicks starts an HTTP requests the request is added as span to the user-interaction transaction instead of starting a new transaction of type http-request. I could disable automatic user-interaction instrumentation but I was wondering why it acts like that. This request won't be included in the http-request overview in Kibana and could give a wrong view, not?