Tyk Dashboard Analytics - Activity by key: incorrect search results

Imported Google Group message. Original thread at: https://groups.google.com/forum/#!topic/tyk-community-support/qRl4Vc1xP54 Import Date: 2016-01-19 21:21:34 +0000.
Sender:Senthil Muniswamy.
Date:Thursday, 27 August 2015 17:14:32 UTC+1.

Hi Martin,

Activity by key search is not working as expected.

Tyk received 2 requests around 24/8/2015 22:30 PM EDT which are logged with timestamp of 25/8/2015 02:30 UTC.

Following search should have returned those 2 requests but it did not. Even though the days are included in the result, seems like the search is based on tyk_analytics.timestamp by not including either days.

api/activity/keys/09bf2428-b950-4c93-a275-5d9e4bf68da6/24/8/2015/25/8/2015?p=-1&res=day
{
“data”: [
{
“id”: {
“day”: 24,
“month”: 8,
“year”: 2015,
“hour”: 0,
“code”: 200,
“path”: “”,
“key”: “”
},
“hits”: 0,
“success”: 0,
“error”: 0,
“last_hit”: “0001-01-01T00:00:00Z”,
“request_time”: 0
},
{
“id”: {
“day”: 25,
“month”: 8,
“year”: 2015,
“hour”: 0,
“code”: 200,
“path”: “”,
“key”: “”
},
“hits”: 0,
“success”: 0,
“error”: 0,
“last_hit”: “0001-01-01T00:00:00Z”,
“request_time”: 0
}
],
“pages”: 0
}

So, I had to expand the search range by a day on either side.

api/activity/keys/09bf2428-b950-4c93-a275-5d9e4bf68da6/24/8/2015/26/8/2015?p=-1&res=day

{
“data”: [
{
“id”: {
“day”: 24,
“month”: 8,
“year”: 2015,
“hour”: 0,
“code”: 0,
“path”: “”,
“key”: “”
},
“hits”: 2,
“success”: 0,
“error”: 2,
“last_hit”: “2015-08-24T22:36:41.987-04:00”,
“request_time”: 0
},
{
“id”: {
“day”: 25,
“month”: 8,
“year”: 2015,
“hour”: 0,
“code”: 200,
“path”: “”,
“key”: “”
},
“hits”: 0,
“success”: 0,
“error”: 0,
“last_hit”: “0001-01-01T00:00:00Z”,
“request_time”: 0
},
{
“id”: {
“day”: 26,
“month”: 8,
“year”: 2015,
“hour”: 0,
“code”: 200,
“path”: “”,
“key”: “”
},
“hits”: 0,
“success”: 0,
“error”: 0,
“last_hit”: “0001-01-01T00:00:00Z”,
“request_time”: 0
}
],
“pages”: 0
}

Seem like, the search is based on UTC time but the result is based requests timestamp on server timezone.

Thanks,
Senthil

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 27 August 2015 17:58:02 UTC+1.

Hi Senthil,

Yes potentially - recommend adding a ticket to Tyk GitHub repo as the analytics are stored based on the time stamp of the node handling the request - what is he time on the node set to?

They are stored in ISO format and everything is based off the server time. There is no time conversion done at all (yet).

Many thanks,
Martin


From: Senthil Muniswamy [email protected]
Sent: Thursday, August 27, 2015 17:14
Subject: Tyk Dashboard Analytics - Activity by key: incorrect search results
To: Tyk Community Support [email protected]

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/a06499dd-ab98-4b2a-8400-a0248345e82c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.