Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sdk/log/internal/observ/simple_log_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ func NewSLP(id int64) (*SLP, error) {
// LogProcessed records that a log has been processed by the SimpleLogProcessor.
// If err is non-nil, it records the processing error as an attribute.
func (slp *SLP) LogProcessed(ctx context.Context, err error) {
slp.processed.Add(ctx, 1, slp.addOption(err)...)
if slp.processed.Enabled(ctx) {
slp.processed.Add(ctx, 1, slp.addOption(err)...)
}
}

func (slp *SLP) addOption(err error) []metric.AddOption {
Expand Down