Starlark Processor Plugin
The starlark
processor uses a Starlark script to process events.
The Starlark script must have a process
function that accepts an event and returns an event, events list, error or None. If function does not exists it is a compilation error, if it have other signature, it is a runtime error. When error returns, an event marked as failed and provided error adds to an event.
Minimalistic example:
def process(event):
return event
Configuration
[[processors]]
[processors.starlark]
# script file with code
file = "script.star"
# starlark code
# if both, code and file, are set
# code will be used
code = '''
def process(event):
return event
'''