Skip to content

Commit

Permalink
Fix multiple exporters panic (#1563)
Browse files Browse the repository at this point in the history
While using more than one exporter the panic runtime exception was fired
because the array allocated for exporters was as twice as big as it should

Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
sumo-drosiek authored Aug 17, 2020
1 parent 621e599 commit fa62be6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/builder/pipelines_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ func (pb *PipelinesBuilder) buildFanoutExportersLogConsumer(
}

exporters := make([]consumer.LogsConsumer, len(builtExporters))
for _, builtExp := range builtExporters {
exporters = append(exporters, builtExp.le)
for i, builtExp := range builtExporters {
exporters[i] = builtExp.le
}

// Create a junction point that fans out to all exporters.
Expand Down

0 comments on commit fa62be6

Please sign in to comment.