Skip to main content

Event Logging Example

With Traffic Policy, you can connect your API to ngrok's event logging system for smarter troubleshooting, testing, and integration of logging services like Datadog for your API gateway and upstream services.

This rule:

  1. Checks if the response status code is not in the 200 range
  2. Logs the unsuccessful request with a custom message and metadata

You can use one of the following snippets:

Policy

Loading…

Agent Config

Loading…

See the log Traffic Policy action docs for more information.