Skip to content

Commit

Permalink
log when we find a span context match
Browse files Browse the repository at this point in the history
  • Loading branch information
makinje16 committed Oct 4, 2023
1 parent c1e19ef commit d3966b3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/vt/vtgate/plugin_mysql_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,8 @@ func startSpanTestable(ctx context.Context, query, label string,
_, comments := sqlparser.SplitMarginComments(query)
match := r.FindStringSubmatch(comments.Leading)
span, ctx := getSpan(ctx, match, newSpan, label, newSpanFromString)
if len(match) == 0 {
log.Info("No match found for span context")
return trace.NoopSpan{}, ctx, nil
if len(match) != 0 {
log.Infof("Span Context Match: %v", match)
}

trace.AnnotateSQL(span, sqlparser.Preview(query))
Expand Down

0 comments on commit d3966b3

Please sign in to comment.