How to get the error details of the fail traffic.

Not applicable

I have gone through the tutorial of API creation. I have build the HelloWorld API according to tutorial. I have set the Rate to 1pm, now when I am starting the trace and send more than 1 request within the timeframe I am able to see the error log why the message has failed in trace. But after sometime or after closing the trace window How do I get the details of the message failed during any particular time frame. In performance view I can see the graph showing 3-4 messages in error or in red color graph, but how do i trace for those errors. I am not finding any log captured for those. Please help me out to get the details/log of the messages that were failed.

0 5 1,062
5 REPLIES 5

@suman sourabh ,

Great Question, Welcome to Apigee Community.

By default, we don't capture error response messages of APIs. But you can capture same using Message Logging Policy. Private Cloud we support logging to Disk. On Cloud you have to use remote syslog server / 3rd party logging systems like loggly / splunk / sumo logic.

You can log to 3rd party logging systems like loggly / splunk / sumo logic using above policy. See policy documentation for more details. Also, See 4MV4D for log messages to loggly here.

Hope it helps. Keep us posted if any.

Hi Anil, Thanks for the link. I have followed the guide and created the messaging log as per the given instructions.

I my scenario I have simply used the ArrestSpikesPolicy and the messagingLog policy.
I am able to see the log in loggly search tab. I have used the messaging log policy before and after the ArrstSpikes log.

When I trigger the message with rate more than defined then it is getting failed with 500 code in Trace tool in APIGEE Edge, but in loggly I am not able to trace this error. here I can see only the custom log that I have defined in the messagingLog policy.

Please help me to capture the logs for error in different steps apart from the Messaging Log policy.

Hi @suman sourabh, I know this is a late answer but, just FYI, we need to use a Message Logging Policy in the PostClientFlow. In this flow, the Message Logging Policy(MLP) will have access to all the details/variables of the policies & proxy.

In your case I think you used an MLP right after Spike Arrest policy. When a policy gives an error, it enters error flow/state & next policies are not executed.

Not applicable

We noticed this is the limitation of apigee. We can not get entire trace in system log. Enabling Debug mode on server is not recommended. Message Logging policy is not much useful for detailed error.

Message Logging policy is not much useful for detailed error.

Hi @chendra, may I know why you came to this conclusion?

The Message Logging Policy is indeed used to get the detailed error log. It can access data from all the Flows Request/Response & Policies.