pub fn selector_suggestions_from_value<T: ProcessValue>(
value: &mut Annotated<T>,
) -> BTreeSet<SelectorSuggestion>
Expand description
Walk through a value and collect selectors that can be applied to it in a PII config. This function is used in the UI to provide auto-completion of selectors.
This generates a couple of duplicate suggestions such as request.headers
and $http.headers
in order to make it more likely that the user input starting with either prefix can be
completed.
The main value in autocompletion is that we can complete $http.headers.Authorization
as soon
as the user types Auth
.
XXX: This function should not have to take a mutable ref, we only do that due to restrictions on the Processor trait that we internally use to traverse the event.