Skip to content

Commit

Permalink
skip wrong sink
Browse files Browse the repository at this point in the history
  • Loading branch information
dzy176 committed Apr 25, 2024
1 parent 2e79815 commit d254605
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/exporter/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ func (i *inspServer) start(cfg *InspServerConfig) error {
sinks, err := createSink(cfg.EventConfig.EventSinks)
if err != nil {
log.Errorf("failed create sinks, err: %v", err)
return
} else if len(sinks) != len(cfg.EventConfig.EventSinks) {
log.Warnf("expected to create %d sinks , but %d were created", len(cfg.EventConfig.EventSinks), len(sinks))
}

log.Infof("start event server")
Expand Down Expand Up @@ -366,7 +367,8 @@ func createSink(sinkConfigs []EventSinkConfig) ([]sink.Sink, error) {
for _, config := range sinkConfigs {
s, err := sink.CreateSink(config.Name, config.Args)
if err != nil {
return nil, fmt.Errorf("failed create sink %s, err: %w", config.Name, err)
log.Errorf("failed create sink %s, err: %v", config.Name, err)
continue
}
ret = append(ret, s)
}
Expand Down

0 comments on commit d254605

Please sign in to comment.