Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed May 21, 2021
1 parent 71bce1b commit d8b5067
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions obsreport/obsreport_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
)

const (
// PipelineKey is the name of the pipeline
PipelineKey = "pipeline"
// pipelineKey is the name of the pipeline
pipelineKey = "pipeline"
)

var (
tagKeyPipeline, _ = tag.NewKey(PipelineKey)
tagKeyPipeline, _ = tag.NewKey(pipelineKey)
// mPipelineProcessingMetrics records the an observation for each
// received batch each time it is exported. For example, a pipeline with
// one receiver and two exporters will record two observations for each
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 d8b5067

Please sign in to comment.