APM: joining spans and transactions


I am using Elastic APM and I need to know how much time spent a transaction accessing to my MongoDB.

For that I'm trying to make a table visualisation on Kibana joining data about transactions and spans but I have some problems.

When I filter by a specific trace.id, I can see the data; else, I do not see mongodb time.

These are the cases:

Error case (generic):

Happy case (specific trace.id):

As you can see, in the second case when I'm filtering by a specific transaction, I can cross the data and achieve my metrics.

But how can I make this in a more generic way for all transactions? Is this possible?
I have invested a lot of time trying with aggregations because I know that a simple join (like SQL) is not possible but I do not understand how I could achieve my final table.

Can someone help me?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.