Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Jun 4, 2021
1 parent 401b884 commit 7e69a99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion obsreport/obsreport_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"time"

"go.opencensus.io/stats"

"go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics"
)


type pipelineStartContextKey struct{}

func recordPipelineStart(ctx context.Context) context.Context {
Expand Down
4 changes: 3 additions & 1 deletion processor/batchprocessor/batch_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ func (bp *batchProcessor) sendItems(triggerMeasure *stats.Int64Measure) {
if err := bp.batch.export(bp.exportCtx, bp.sendBatchMaxSize); err != nil {
bp.logger.Warn("Sender failed", zap.Error(err))
}
// Reset the context
// The accumulated b.exportCtx was associated with the batch of telemetry
// we just exported. Clear the context so that the next bacth is sent only
// with contexts used when constructing it.
bp.exportCtx = context.Background()
}

Expand Down

0 comments on commit 7e69a99

Please sign in to comment.