Skip to content

Commit 4c64883

Browse files
committed
refactor(sdk/log): move defer to conditional block to reduce overhead
1 parent f569a92 commit 4c64883

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/log/simple.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (s *SimpleProcessor) OnEmit(ctx context.Context, r *Record) (err error) {
9393
defer func() {
9494
simpleProcRecordsPool.Put(records)
9595
}()
96-
96+
9797
if s.selfObservabilityEnabled {
9898
defer func() {
9999
attrs := make([]attribute.KeyValue, 2, 3)

0 commit comments

Comments
 (0)