There are concerns that the current approach of providing .GetToken and .SetToken methods for the RuleResult struct (which parse and mutate the contents of the .Metadata string field of the struct, respectively) could be confusing to users.
Metadata is an unindexed string field and is meant for audit rules to pass arbitrary data to notification functions that go beyond the human-readable .Message property.
One possible solution is to remove these as methods to avoid imposing on users the usage pattern consisting on essentially using a string to store a string-to-string map.
Comment 1 by robert...@chromium.org
, Apr 4 2018