Skip to content

Commit 2387f20

Browse files
committed
Fix SA9003 staticcheck lint errors in exporter
Add explicit statements to empty if blocks to satisfy staticcheck SA9003. These branches are intentionally empty as they swallow errors/panics to ensure telemetry never impacts driver operation. Signed-off-by: samikshya-chand_data <samikshya.chand@databricks.com>
1 parent 7fe0e54 commit 2387f20

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

telemetry/exporter.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ func (e *telemetryExporter) export(ctx context.Context, metrics []*telemetryMetr
6363
// Swallow all errors and panics
6464
defer func() {
6565
if r := recover(); r != nil {
66-
// Log at trace level only
67-
// logger.Trace().Msgf("telemetry: export panic: %v", r)
66+
// Intentionally swallow panic - telemetry must not impact driver
67+
_ = r // Log at trace level only: logger.Trace().Msgf("telemetry: export panic: %v", r)
6868
}
6969
}()
7070

@@ -79,8 +79,8 @@ func (e *telemetryExporter) export(ctx context.Context, metrics []*telemetryMetr
7979
}
8080

8181
if err != nil {
82-
// Log at trace level only
83-
// logger.Trace().Msgf("telemetry: export error: %v", err)
82+
// Intentionally swallow error - telemetry must not impact driver
83+
_ = err // Log at trace level only: logger.Trace().Msgf("telemetry: export error: %v", err)
8484
}
8585
}
8686

0 commit comments

Comments
 (0)