in confgenerator/filter/internal/ast/ast.go [124:147]
func (m Target) fluentBitPath() ([]string, error) {
unquoted, err := m.Unquote()
if err != nil {
return nil, err
}
var fluentBit []string
if len(unquoted) == 1 {
if v, ok := logEntryRootValueMapToFluentBit[unquoted[0]]; ok {
fluentBit = []string{v}
}
}
if len(unquoted) >= 1 {
if v, ok := logEntryRootStructMapToFluentBit[unquoted[0]]; ok {
fluentBit = prepend(v, unquoted[1:])
} else if unquoted[0] == "jsonPayload" && len(unquoted) > 1 {
// Special case for jsonPayload, where the root "jsonPayload" must be omitted
fluentBit = unquoted[1:]
}
}
if fluentBit == nil {
return nil, fmt.Errorf("field %q not found", strings.Join(m, "."))
}
return fluentBit, nil
}