# How to find correlated messages and time between them

**URL:** <https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775>\
**Category:** Elasticsearch\
**Created:** [April 27, 2018, 6:53am UTC](https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775 "2018-04-27T06:53:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![quooston](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quooston/32/30539_2.png) [@quooston](https://discuss.elastic.co/u/quooston)\
**Post date:** [April 27, 2018, 6:53am UTC](https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775/1 "2018-04-27T06:53:50Z")

</div>

Hi, total newb here.. be nice!

So, I have previously used Application Insights in Azure to do this and it was very simple. I am however finding it rather frustrating to get the same result using Timelion, which I assume is the correct tool for the job?

I have a message which get's logged, say, Message-A. Message-A has a CorrelationId of 111. Some time later Message-B comes along and shares the same CorrelationId of 111 with Message-A. I want to measure and graph the amount of time between Message-A and Message-B.

I'd like to do this for all correlated messages and preferably chart it as a scatter chart, for example.

I think understanding how to do this will really help me get a grasp of things, any help greatly appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [April 27, 2018, 7:50am UTC](https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775/2 "2018-04-27T07:50:03Z")

</div>

See the discussion here: [Using painless to calculate durations](https://discuss.elastic.co/t/using-painless-to-calculate-durations/119495)

---

<div class="post-metadata">

**Author:** ![quooston](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quooston/32/30539_2.png) [@quooston](https://discuss.elastic.co/u/quooston)\
**Post date:** [April 27, 2018, 12:45pm UTC](https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775/3 "2018-04-27T12:45:45Z")

</div>

Thanks, I'll look into that.

---

<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:** [May 25, 2018, 12:45pm UTC](https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775/4 "2018-05-25T12:45:48Z")

</div>

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