File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 "sort"
99 "strings"
1010
11- "golang.org/x/exp/slices"
12-
1311 "github.com/fluent/fluent-bit-go/output"
1412 redis "github.com/redis/go-redis/v9"
1513)
@@ -166,21 +164,13 @@ func toTimestamp(ts interface{}) string {
166164
167165func checkRecord (record map [interface {}]interface {}) bool {
168166 if kubernetes , ok := record ["kubernetes" ].(map [interface {}]interface {}); ok {
169- if labels , ok := kubernetes [ "labels" ].( map [ interface {}] interface {}); ok {
170- // application logs deployed by drycc
171- heritage := fmt . Sprintf ( "%s" , labels [ "heritage" ])
172- namespace := fmt .Sprintf ("%s" , kubernetes [ "namespace_name " ])
173- if ! slices . Contains ( ExcludeNamespaces , namespace ) && heritage == "drycc" && labels [ "app" ] != nil {
167+ // drycc controller
168+ container := fmt . Sprintf ( "%s" , kubernetes [ "container_name" ])
169+ if ok && strings . HasPrefix ( container , ControllerName ) {
170+ log := fmt .Sprintf ("%s" , record [ "log " ])
171+ if ok && len ( ControllerRegex . FindStringSubmatch ( log )) > 0 {
174172 return true
175173 }
176- // drycc controller
177- container := fmt .Sprintf ("%s" , kubernetes ["container_name" ])
178- if ok && strings .HasPrefix (container , ControllerName ) {
179- log := fmt .Sprintf ("%s" , record ["log" ])
180- if ok && len (ControllerRegex .FindStringSubmatch (log )) > 0 {
181- return true
182- }
183- }
184174 }
185175 }
186176 return false
You can’t perform that action at this time.
0 commit comments