add a custom detector check for logging duplicate detector (#1394)

* add a custom detector check for logging duplicate detector

* use pb type
This commit is contained in:
Zachary Rice
2023-06-13 14:49:21 -05:00
committed by GitHub
parent c2e3e7d53a
commit 74ffbd2878
+1 -1
View File
@@ -165,7 +165,7 @@ func Start(ctx context.Context, options ...EngineOption) *Engine {
seenDetectors := make(map[config.DetectorID]struct{}, len(dets))
for _, det := range dets {
id := config.GetDetectorID(det)
if _, ok := seenDetectors[id]; ok {
if _, ok := seenDetectors[id]; ok && id.ID != detectorspb.DetectorType_CustomRegex {
ctx.Logger().Info("possible duplicate detector configured", "detector", id)
}
seenDetectors[id] = struct{}{}