# Track and show transactions progress based on codes

**URL:** <https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867>\
**Category:** Kibana\
**Created:** [November 14, 2022, 11:34am UTC](https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867 "2022-11-14T11:34:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murali\_Y](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/murali_y/32/98137_2.png) [@Murali\_Y](https://discuss.elastic.co/u/Murali_Y)\
**Post date:** [November 14, 2022, 11:34am UTC](https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867/1 "2022-11-14T11:34:36Z")

</div>

Hello,  
We are writing our business flow related transactions start and end state using different state codes i.e. When we pick the transaction it will logged with code 10001 (in progress) and end of it will be logged with 10002 or 100003 (success and failure respectively).

When I plot a table for in progress (state code 10001) transactions table forever shows the same transactions as log entry with 10001 is already made and cannot be overwritten.  
How can we dynamically take off the already processed transactions from the table?

Sample log entries:

@timestamp:Sep 10, 2022 @ 20:11:42.677 fingerprint:2222-605819443b6 Item\_Name:069931601477 StateCode 10001 jobId:4444-ff-4555 level:Info levelOrdinal:2 logF\_BusinessProcessName:Test logType:User machineId:111 machineName:hostname1 message:test | ProcessCode : 10000 rawMessage:{"message":"test| ProcessCode : 10000","level":"Information","logType":"User","timeStamp":"2022-09-10T20:11:42.6778335+05:30"

@timestamp:Sep 10, 2022 @ 20:11:46.531 fingerprint:2322-44444444 Item\_Name:069931601477 StateCode 10002 jobId:4444-ff-4555 level:Info levelOrdinal:2 logF\_BusinessProcessName:Test logType:User machineId:111 machineName:hostname1 message:test | ProcessCode : 10000 rawMessage:{"message":"test| ProcessCode : 10000","level":"Information","logType":"User","timeStamp":"2022-09-10T20:11:46.531895+05:30"

Please suggest.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 15, 2022, 12:17am UTC](https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867/2 "2022-11-15T00:17:38Z")

</div>

Is the `jobId` the unique identifier?

---

<div class="post-metadata">

**Author:** ![Murali\_Y](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/murali_y/32/98137_2.png) [@Murali\_Y](https://discuss.elastic.co/u/Murali_Y)\
**Post date:** [November 15, 2022, 2:51am UTC](https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867/3 "2022-11-15T02:51:36Z")

</div>

@warkolm Thanks for responding. Item\_Name field is our unique identifier on which I want to track and show their progress in a table.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 15, 2022, 3:26am UTC](https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867/4 "2022-11-15T03:26:28Z")

</div>

Ok use a terms aggregation on the `Item_name` and then a `top_hits` one on the `@timestamp` to only show the latest event. That way you keep the history for each item for other analytics, but are able to grab the latest one.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 13, 2022, 3:11am UTC](https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867/5 "2022-12-13T03:11:11Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 10, 2023, 3:11am UTC](https://discuss.elastic.co/t/track-and-show-transactions-progress-based-on-codes/318867/6 "2023-01-10T03:11:58Z")

</div>

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