Skip to main content

Log

Overview

The Log policy action allows you to leverage ngrok's eventing system to introduce observability into your traffic policy.

Example

# snippet
---
actions:
- type: "log"
config:
metadata:
message: "Invalid TLS Version"
edge_id: "edghts_2bhsN2VP8W4pTkaMSrhyj0SRf8J"
edge_route_id: "edghtsrt_2bhsN5u05QQ1MRrI3XbpDQMFSE7"

Behavior

When this action is executed, the specified metadata will be collected on the tcp_connection_closed.v0 event under traffic_policy.logs.

Reference

Supported Directions

  • Inbound

Configuration

Type
log
Parameter Description
metadataMap<string, any>A map of metadata that you would like to be included in the details of your log event.

Action Result Variables

The following variables are available following the invocation of this action.

NameTypeDescription
actions.ngrok.log.metadatamap[string]stringThe key value map of the metadata values.