Custom JavaScript enrichment
With this enrichment, you can write a JavaScript function to be executed for each event. Use this enrichment to apply your own business logic to your events, including:
- Adding extra data to the event in the form of entities
- Modifying event fields directly
- Discarding the event so that it goes to failed events rather than your data destination
Configurationโ
base64 encoding
Notice that in the configuration file you will need to provide the JavaScript code of your enrichment encoded in base64.
Outputโ
This enrichment is the only one that can both update fields of the atomic event in-place or/and add derived contexts to the enriched event.
๐๏ธ Writing your enrichment
How to write the enrichment code in JavaScript.
๐๏ธ Testing your enrichment
How to test and debug your enrichment code.
๐๏ธ Example code
Examples of enrichment code in JavaScript.