Skip to main content
Processors implement the processor interface defined in .tangent/wit/processor.wit.

Interface

The interface has three methods to implement

Metadata

Name and version of your plugin

Probe

Used to tell the host which logs to send to the mapper
Will send all logs with
or

ProcessLogs

This is the business logic of your plugin. It takes in a log.Logview, which allows it to read json data provided by the host. This function can return scalars, lists, or maps. Performance note: Always prefer to fetch scalar values from the log. Scalars do not create heap allocations. Fetching lists and maps allocate on the heap, which hurts performance.

Enriching logs

Plugins can make network calls to enrich logs. In this example, we batch all unique IPs found in the logs, call a remote API once per IP, and merge the results back into the output. The Go, Python, and Rust examples below show the same enrichment behavior.

Local dev loop