Skip to content

Commit

Permalink
Log non-existentent analyzers instead of adding to analyzer results (#…
Browse files Browse the repository at this point in the history
…1593)

log to debug non-existent analyzes instead of adding to analyzers results
  • Loading branch information
diamonwiggins authored Aug 14, 2024
1 parent d83d8eb commit fa14616
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions pkg/analyze/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,8 @@ func Analyze(

analyzerInst := getAnalyzer(analyzer)
if analyzerInst == nil {
return []*AnalyzeResult{{
IsFail: true,
Title: "nonexistent analyzer",
Message: "Analyzer not found",
}}, nil
klog.Info("Non-existent analyzer found in the spec. Please double-check the spelling and indentation of the analyzers in the spec.")
return nil, nil
}

_, span := otel.Tracer(constants.LIB_TRACER_NAME).Start(ctx, analyzerInst.Title())
Expand Down
2 changes: 1 addition & 1 deletion sample-troubleshoot.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: troubleshoot.sh/v1beta2
kind: Collector
kind: SupportBundle
metadata:
name: my-application-name
spec:
Expand Down

0 comments on commit fa14616

Please sign in to comment.