Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>

Co-authored-by: Albert <26584478+albertteoh@users.noreply.github.com>
  • Loading branch information
yurishkuro and albertteoh authored May 29, 2022
1 parent ff415e5 commit cbef013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/collector/app/handler/otlp_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func StartOtelReceiver(options OtelReceiverOptions, logger *zap.Logger, spanProc

otlpConsumer := newConsumerDelegate(logger, spanProcessor)
// the following two constructors never return errors given non-nil arguments, so we ignore errors
nextConsumer, _ := consumer.NewTraces(consumer.ConsumeTracesFunc(otlpConsumer.consume))
nextConsumer, _ := consumer.NewTraces(otlpConsumer.consume)
otlpReceiver, _ := otlpFactory.CreateTracesReceiver(
context.Background(),
otlpReceiverSettings,
Expand Down Expand Up @@ -90,7 +90,7 @@ type consumerDelegate struct {
protoFromTraces func(td ptrace.Traces) ([]*model.Batch, error)
}

func (c *consumerDelegate) consume(ctx context.Context, ld ptrace.Traces) error {
func (c *consumerDelegate) consume(_ context.Context, ld ptrace.Traces) error {
batches, err := c.protoFromTraces(ld)
if err != nil {
return err
Expand Down

0 comments on commit cbef013

Please sign in to comment.