Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd committed Apr 5, 2023
1 parent 5cfdde8 commit 9ab2157
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions processor/batchprocessor/batch_processor.go
Expand Up @@ -24,6 +24,7 @@ import (
"sync"
"time"

"go.opentelemetry.io/otel/attribute"
"go.uber.org/zap"

"go.opentelemetry.io/collector/client"
Expand All @@ -34,21 +35,11 @@ import (
"go.opentelemetry.io/collector/pdata/pmetric"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.opentelemetry.io/collector/processor"
"go.opentelemetry.io/otel/attribute"
)

// errTooManyBatchers is returned when the MetadataCardinalityLimit has been reached.
var errTooManyBatchers = consumererror.NewPermanent(errors.New("too many batcher metadata-value combinations"))

// attributeSet is a stand-in for otel-go's attribute.Set. See
// https://github.com/open-telemetry/opentelemetry-collector/pull/7325#discussion_r1126972549.
type attributeSet string

// attributeKeyValue is a stand-in for otel-go's attribute.KeyValue, which
// exposes a simple API to compute attribute sets. See
// https://github.com/open-telemetry/opentelemetry-collector/pull/7325#discussion_r1126972549.
type attributeKeyValue string

// batch_processor is a component that accepts spans and metrics, places them
// into batches and sends downstream.
//
Expand Down Expand Up @@ -288,7 +279,7 @@ func (b *batcher) sendItems(trigger trigger) {
}
}

func (sb *singleBatcher) findBatcher(ctx context.Context) (*batcher, error) {
func (sb *singleBatcher) findBatcher(_ context.Context) (*batcher, error) {
return sb.batcher, nil
}

Expand Down Expand Up @@ -320,7 +311,7 @@ func (mb *multiBatcher) findBatcher(ctx context.Context) (*batcher, error) {
return b, nil
}

if limit := mb.metadataLimit; limit != 0 && len(mb.batchers) >= int(limit) {
if limit := mb.metadataLimit; limit != 0 && len(mb.batchers) >= limit {
return nil, errTooManyBatchers
}

Expand Down

0 comments on commit 9ab2157

Please sign in to comment.