My goal is to combine different event data concerning the same transaction.
For example : I receive an "start event" about the transaction #123, then a "end event" about the same transaction #123.
For the moment, I have two GTS, one for "start event", one for "end event" but I don't know where to put the transaction identifier.
A first computation is to calculate the duration of the transaction. I used two GTS with the transaction identifier in the value of the GTS. Then I used a map to store the "start event" values with the transaction identifier as the key and the timestamp of the event as the value. Then I parsed the "end event" and searched each entry of the "start event" map and made the calculation between the two timestamps.
This part is OK.
Then, the second computation is to retrieve the amount of the transaction when the transaction is OK. But, the fact that the transaction is OK is given by the "end event" and the amount of the transaction is given by the "start event". Thus, I have to "combine" the 2 events to compute the total amount of the successful transactions.
How to do this ?
Remark : we can't use the same computation as the first, because, we can't put the transaction amount AND the transaction identifier in the value cause we can only store 1 value.
First try : put the transaction identifier as a label BUT as the transaction identifier is unique, the global performance of the Platform is ugly.
Second try : we are currently trying to put in the value, the concatenation of the transaction amount and the transaction identifier.
Does the community have a better idea to compute this "total amount of the successful transaction" ?
Regards,
Nicolas