Skip to content

Commit

Permalink
refactor(utils.go): use base64 encoded string instead of byte array t…
Browse files Browse the repository at this point in the history
…o set grpcTraceBinHeader

The function setNewGRPCTraceHeaderFromContext in utils.go has been refactored to use a base64 encoded string instead of a byte array to set the grpcTraceBinHeader. This improves the readability of the code and makes it easier to understand what is happening.
  • Loading branch information
shumkovdenis committed May 11, 2023
1 parent 4905e0b commit 00579c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/integration/helpers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func setNewGRPCTraceHeaderFromContext(header HeaderSetter, ctx context.Context)
val := BinaryFromSpanContext(newsc)
s := base64.StdEncoding.EncodeToString(val)
log.Println("BinaryFromSpanContext", s)
header.Set(grpcTraceBinHeader, string(val))
header.Set(grpcTraceBinHeader, s)
}
}
}

0 comments on commit 00579c8

Please sign in to comment.