Log Browser - Issue

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 :

  1. I am not able to see any success call entry in the log brower.
  2. 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

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

  1. Activity by API

  2. Activit by Key

  3. Log Browser

  4. Tyk PUMP logs
    image

Hi Guys,

Any suggestion on the above issue?

Regards

Hi,
It might be a bug. I’m checking it. Please bear with me.

Hi
It looks like we have a bug here. I have opened a ticket for it https://github.com/TykTechnologies/tyk/issues/1960

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