Skip to content

Commit

Permalink
change log keyvals order
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiangreco committed Jan 20, 2025
1 parent 1b5f9de commit ae58553
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,20 @@ func (c *QuerySample) fetchQuerySamples(ctx context.Context) error {
sampleText = sampleText[:idx]
}
} else {
level.Debug(c.logger).Log("msg", "skipping parsing truncated query", "digest", digest, "schema", schemaName)
level.Debug(c.logger).Log("msg", "skipping parsing truncated query", "schema", schemaName, "digest", digest)
continue
}
}

stmt, err := sqlparser.Parse(sampleText)
if err != nil {
level.Error(c.logger).Log("msg", "failed to parse sql query", "digest", digest, "schema", schemaName, "err", err)
level.Error(c.logger).Log("msg", "failed to parse sql query", "schema", schemaName, "digest", digest, "err", err)
continue
}

sampleRedactedText, err := sqlparser.RedactSQLQuery(sampleText)
if err != nil {
level.Error(c.logger).Log("msg", "failed to redact sql query", "digest", digest, "schema", schemaName, "err", err)
level.Error(c.logger).Log("msg", "failed to redact sql query", "schema", schemaName, "digest", digest, "err", err)
continue
}

Expand Down

0 comments on commit ae58553

Please sign in to comment.