Hello Experts,
This is regarding analytics data in log browser, Tyk setup : On premises
MongoDB : Primary , Secondary , Arbiter
Redis : single instance
Configuration tyk.conf : enable_analytics and enable_detailed_recording as true
Objective: to see request and response payload in log browser (if it is possible)
API endpoint is set to http://httpbin.org
Response is mocked in Tyk with status code as 200
Issues :
I am not able to see any success call entry in the log brower.
In case of error (throttling exceeded) not able to find any response even if I mock the error response
Is it expected behavior or have to do some other configuration as well.
PS: There is no access to internet as of now, that is why mocking the response.
Regards
1 Like
Yaara
October 29, 2018, 4:00pm
2
Is the pump running?
Are there any messages in its logs?
Can you see any analytics at all (by key for instance)?
Thanks
Hi Yaara,
Is the pump running?
Yes
Are there any messages in its logs?
Yes, writing and purging logs
Can you see any analytics at all (by key for instance)?
Yes, for all transactions with error, entry is there and i am able to filter out based on dates, api name
Attach is the snippet from pump logs and analytics screen
Activity by API
Activit by Key
Log Browser
Tyk PUMP logs
Hi Guys,
Any suggestion on the above issue?
Regards
Yaara
November 1, 2018, 2:11pm
5
Hi,
It might be a bug. I’m checking it. Please bear with me.
Yaara
November 1, 2018, 4:51pm
6
Yaara
November 1, 2018, 5:09pm
7
In order to get policy enforcemet and analytics please use Virtual endpoint instead.
For instand put this code in the text box:
function myVirtualHandler (request, session, config) {
rawlog(“Virtual Test running”)
var responseObject = {
//Body: “THIS IS A VIRTUAL MOCK RESPONSE”,
Body: “yo yo”,
Headers: {
“x-test-1”: “virtual”
},
Code: 200
}
rawlog(“Virtual Test ended”)
return TykJsResponse(responseObject, session.meta_data)
}
Hello Yaara,
Thanks for your response, and yes with this JS function SUCCESS response are getting logged and visible in the analytics logs
Regards