Apigee Edge Logging

Hi i want to know as a best practice should we log every request that comes to APIGEE Edge in logging systems such as Sumologic or Loggly etc. or should we only do it in case of errors from both proxy and target endpoint.

We are using Error Handling shared flow and then in case if there is an error we are logging it to Loggly using correlation id.

Also, there are many ways like Message Logging, PostClientFlow, JS calling the http endpoint. Not able to find specific use-case/situation where one would be preferred over other.

thanks.

0 2 647
2 REPLIES 2

sidd-harth
Participant V

I would recommend logging for both error and success scenarios.

It is also recommended to use MessageLogging Policy in a PostClientFlow to log messages to third party systems.

If your third party logging system, expects an HTTP call, then I guess we can use the Service Callout policy as well in PostClientFlow for logging. (I read somewhere on the community that this feature was added, please do check from your end)

Not applicable

Below are some best practices.

1. use logging in post-client flow.

2. log both request and response.

3. log both success and failure case

4. don't log payloads

5. don't log security information and credentials

6. Take the consent from the service provider before logging confidential

7. log message id or message processor ip so that it will help in seeing the logs of components

8. Use message logging policy in post client flow.

9. Add logs to file system in mp and do log rotation