Log
Overview
The Log Traffic Policy action enables you to leverage ngrok's eventing system to introduce observability into your traffic policy documents.
Configuration Reference
This is the Traffic Policy configuration reference for this action.
Action Type
log
Configuration Fields
Parameter | Type | Description |
---|---|---|
metadata | map[string]any | Required. A key-value map of metadata that you would like to include in your events for this action. Supports CEL Interpolation. |
Supported Phases
on_http_request
on_http_response
on_tcp_connect
Behavior
Event logs
When this action is executed, the specified metadata will be collected on the
http_request_complete.v0 event
under traffic_policy.logs
key.
CEL Interpolation
You can access Traffic Policy variables and embed CEL expressions in this
actions configuration values using CEL Interpolation templates in the form of
${expression}
. Check out the examples below to see how
CEL Interpolation works.
For a complete list of variables and how to write expressions, see Expressions and Variables documentation.