Skip to content

Commit

Permalink
Fix return error for batch processor when consuming Metrics and Logs (#…
Browse files Browse the repository at this point in the history
…7711)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored May 23, 2023
1 parent ae8c63a commit 179d4be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .chloggen/fixbatcherror.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: batchprocessor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix return error for batch processor when consuming Metrics and Logs

# One or more tracking issues or pull requests related to the change
issues: [7711]
4 changes: 2 additions & 2 deletions processor/batchprocessor/batch_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (bp *batchProcessor) ConsumeTraces(ctx context.Context, td ptrace.Traces) e
func (bp *batchProcessor) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error {
b, err := bp.findBatcher(ctx)
if err != nil {
return nil
return err
}
b.newItem <- md
return nil
Expand All @@ -353,7 +353,7 @@ func (bp *batchProcessor) ConsumeMetrics(ctx context.Context, md pmetric.Metrics
func (bp *batchProcessor) ConsumeLogs(ctx context.Context, ld plog.Logs) error {
b, err := bp.findBatcher(ctx)
if err != nil {
return nil
return err
}
b.newItem <- ld
return nil
Expand Down

0 comments on commit 179d4be

Please sign in to comment.