File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ func RemoveSysdigLabels(expr, excludeScope string) string {
8
8
if excludeScope != "" {
9
9
scope = scope + "|" + excludeScope
10
10
}
11
- regex := regexp .MustCompile ("(?:" + scope + ")" + "(?:=|=~|!=|!~)\\ $[\\ w_]*," )
11
+ regex := regexp .MustCompile ("(?:" + scope + ")" + "\\ s* (?:=|=~|!=|!~)\\ $[\\ w_]*," )
12
12
expr = regex .ReplaceAllString (expr , "" )
13
- regex = regexp .MustCompile ("(?:" + scope + ")" + "(?:=|=~|!=|!~)\" \" ," )
13
+ regex = regexp .MustCompile ("(?:" + scope + ")" + "\\ s* (?:=|=~|!=|!~)\" [ \\ w_-]* \" ," )
14
14
expr = regex .ReplaceAllString (expr , "" )
15
- regex = regexp .MustCompile ("(?:" + scope + ")" + "(?:=|=~|!=|!~)\\ $[\\ w_]*\\ }" )
15
+ regex = regexp .MustCompile ("(?:" + scope + ")" + "\\ s* (?:=|=~|!=|!~)\\ $[\\ w_]*\\ }" )
16
16
expr = regex .ReplaceAllString (expr , "}" )
17
- regex = regexp .MustCompile ("(?:" + scope + ")" + "(?:=|=~|!=|!~)\" \" }" )
17
+ regex = regexp .MustCompile ("(?:" + scope + ")" + "\\ s* (?:=|=~|!=|!~)\" [ \\ w_-]* \" }" )
18
18
expr = regex .ReplaceAllString (expr , "}" )
19
19
// Remove the sysdig aggregation
20
20
aggregation := "kube_cluster_name|kube_namespace_name|kube_pod_name|kube_workload_name|kube_node_name|agent_tag_cluster"
You can’t perform that action at this time.
0 commit comments