Skip to content

Commit

Permalink
fix context
Browse files Browse the repository at this point in the history
  • Loading branch information
donald-cheung committed Sep 6, 2024
1 parent a35c776 commit fd12dd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/kafkareceiver/kafka_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func newMetricsReceiver(config Config, set receiver.Settings, unmarshaler Metric
}, nil
}

func (c *kafkaMetricsConsumer) Start(ctx context.Context, host component.Host) error {
func (c *kafkaMetricsConsumer) Start(_ context.Context, host component.Host) error {
ctx, cancel := context.WithCancel(context.Background())
c.cancelConsumeLoop = cancel
obsrecv, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{
Expand Down Expand Up @@ -332,7 +332,7 @@ func newLogsReceiver(config Config, set receiver.Settings, unmarshaler LogsUnmar
}, nil
}

func (c *kafkaLogsConsumer) Start(ctx context.Context, host component.Host) error {
func (c *kafkaLogsConsumer) Start(_ context.Context, host component.Host) error {
ctx, cancel := context.WithCancel(context.Background())
c.cancelConsumeLoop = cancel
obsrecv, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{
Expand Down

0 comments on commit fd12dd2

Please sign in to comment.