Skip to content

Commit

Permalink
fix: Remove very small spans (#1997)
Browse files Browse the repository at this point in the history
We are creating a lot of spans, so this is an attempt to reduce the
number of spans.

Ref: SRX-YNEAHU
  • Loading branch information
sven-urbanski-freiheit-com authored Oct 1, 2024
1 parent f9538e0 commit 7543f4d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,6 @@ func (h *DBHandler) processAllReleasesForAllAppsRow(ctx context.Context, err err
}

func (h *DBHandler) processAllReleasesRow(ctx context.Context, err error, rows *sql.Rows) (*DBAllReleasesWithMetaData, error) {
span, ctx := tracer.StartSpanFromContext(ctx, "processAllReleasesRow")
defer span.Finish()

if err != nil {
return nil, fmt.Errorf("could not query releases table from DB. Error: %w\n", err)
}
Expand Down Expand Up @@ -4565,9 +4562,6 @@ func (h *DBHandler) dbWriteDeploymentAttemptInternal(ctx context.Context, tx *sq
}

func (h *DBHandler) processDeploymentAttemptsRow(ctx context.Context, rows *sql.Rows, err error) (*QueuedDeployment, error) {
span, ctx := tracer.StartSpanFromContext(ctx, "processDeploymentAttemptsRow")
defer span.Finish()

if err != nil {
return nil, fmt.Errorf("could not query deployment attempts table from DB. Error: %w\n", err)
}
Expand All @@ -4593,9 +4587,6 @@ func (h *DBHandler) processDeploymentAttemptsRow(ctx context.Context, rows *sql.

// processSingleDeploymentAttemptsRow only processes the row. It assumes that there is an element ready to be processed in rows.
func (h *DBHandler) processSingleDeploymentAttemptsRow(ctx context.Context, rows *sql.Rows) (*QueuedDeployment, error) {
span, _ := tracer.StartSpanFromContext(ctx, "processSingleDeploymentAttemptsRow")
defer span.Finish()

//exhaustruct:ignore
var row = QueuedDeployment{}
var releaseVersion sql.NullInt64
Expand All @@ -4617,8 +4608,6 @@ func (h *DBHandler) processSingleDeploymentAttemptsRow(ctx context.Context, rows

// processSingleDeploymentRow only processes the row. It assumes that there is an element ready to be processed in rows.
func (h *DBHandler) processSingleDeploymentRow(ctx context.Context, rows *sql.Rows) (*Deployment, error) {
span, _ := tracer.StartSpanFromContext(ctx, "processSingleDeploymentRow")
defer span.Finish()
var row = &DBDeployment{
EslVersion: 0,
Created: time.Time{},
Expand Down Expand Up @@ -5340,9 +5329,6 @@ type DBAllDeploymentsForAppRow struct {
}

func (h *DBHandler) processAllDeploymentRow(ctx context.Context, err error, rows *sql.Rows) (*AllDeploymentsForApp, error) {
span, ctx := tracer.StartSpanFromContext(ctx, "processAllDeploymentRow")
defer span.Finish()

if err != nil {
return nil, fmt.Errorf("could not query all_deployments table from DB. Error: %w\n", err)
}
Expand Down

0 comments on commit 7543f4d

Please sign in to comment.