brexhq / substation

Substation is a toolkit for routing, normalizing, and enriching security event and audit logs.
https://substation.readme.io
MIT License
322 stars 16 forks source link

feat(transform): Add ID Settings Field #181

Closed jshlbrd closed 3 months ago

jshlbrd commented 3 months ago

Description

Motivation and Context

Identifying the location of errors in large config files is a challenge due to the high reuse of transform functions and existing error message format (transform: foo: err goes here), but this is easier when there is a way to uniquely identify each transform.

This PR makes these types of error message possible (where foo is the transform function):

Users who do nothing will start to see auto-gen IDs in places where they used to see transform function names. In the future a pseudo-random default ID would be preferred, but Jsonnet doesn't have any functions to support that.

How Has This Been Tested?

Tested locally (this can be seen by building any existing configs).

Types of changes

Checklist: