Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove error logs in processing loop #431

Merged
merged 1 commit into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/pipeline/ingest/ingest_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ func instrumentGRPC(m *metrics) grpc2.UnaryServerInterceptor {

resp, err = handler(ctx, req)
if err != nil {
glog.Errorf("Reporting metric error: %v", err)
// "trace" level used to minimize performance impact
glog.Tracef("Reporting metric error: %v", err)
m.error(fmt.Sprint(status.Code(err)))
}

Expand Down
12 changes: 7 additions & 5 deletions pkg/pipeline/ingest/ingest_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,21 @@ func (k *ingestKafka) isStopped() bool {
}

func (k *ingestKafka) processRecordDelay(record config.GenericMap) {
TimeFlowEndInterface, ok := record["TimeFlowEndMs"]
timeFlowEndInterface, ok := record["TimeFlowEndMs"]
if !ok {
klog.Errorf("TimeFlowEndMs missing in record %v", record)
// "trace" level used to minimize performance impact
klog.Tracef("TimeFlowEndMs missing in record %v", record)
k.metrics.error("TimeFlowEndMs missing")
return
}
TimeFlowEnd, ok := TimeFlowEndInterface.(int64)
timeFlowEnd, ok := timeFlowEndInterface.(int64)
if !ok {
klog.Errorf("Cannot parse TimeFlowEndMs of record %v", record)
// "trace" level used to minimize performance impact
klog.Tracef("Cannot parse TimeFlowEndMs of record %v", record)
k.metrics.error("Cannot parse TimeFlowEndMs")
return
}
delay := time.Since(time.UnixMilli(TimeFlowEnd)).Seconds()
delay := time.Since(time.UnixMilli(timeFlowEnd)).Seconds()
k.metrics.latency.Observe(delay)
}

Expand Down