Skip to content

Commit

Permalink
Use base32 for traceIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
lalinsky committed Feb 24, 2024
1 parent 30f477e commit 6ee6932
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/fpstore/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package fpstore

import (
"context"
"encoding/base64"
"encoding/base32"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -51,7 +51,7 @@ func setTraceId(ctx context.Context, traceId string) context.Context {

func generateTraceId() string {
traceId := uuid.New()
return base64.URLEncoding.EncodeToString(traceId[:])
return base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString(traceId[:])
}

func setupUnaryRequest(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
Expand Down

0 comments on commit 6ee6932

Please sign in to comment.