Calculate transaction duration

Hi
I'm struggling with one interesting case: we have some data within some patterns. But we don't have any tags: start or end in these documents.
How I can calculate transaction duration? I'm also see great article
Can You suggest some an examples base on painless scripts or logstash code?
Thx!

Could you provide an example of your data and what you're trying to do?

I thought about how to aggregate so the best way will be o make documents per filed "number" by logstash or logstash pipelines and calculate duration (how I can do this)? Can You share some examples?

{
  "message": "abasdsadc",
  "ident": "sample1",
  "@timestamp": "2020-08-18T19:43:36.000Z",
  "number": "1234",
  "x-request": 3423545343432
}

{
  "message": "aasdsadbc",
  "ident": "sample2",
  "@timestamp": "2020-08-18T19:43:76.000Z",
  "number": "1234",
  "x-request": 3423545343432
}

{
  "message": "abasdasdc",
  "ident": "sample3",
  "@timestamp": "2020-08-18T19:43:36.000Z",
  "number": "4556",
  "x-request": 234234234453
}

{
  "message": "aasdsdbc",
  "ident": "sample4",
  "@timestamp": "2020-08-18T19:43:76.000Z",
  "number": "4556",
  "x-request": 234234234453
}

Hi Any updates?

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