Use hexadecimal ids and lowercase names in zipkin input (#3488)
This commit is contained in:
committed by
Daniel Nelson
parent
f9b808572f
commit
113184ddae
@@ -239,7 +239,7 @@ func TraceIDFromString(s string) (string, error) {
|
||||
return fmt.Sprintf("%x%016x", hi, lo), nil
|
||||
}
|
||||
|
||||
// IDFromString creates a decimal id from a hexadecimal string
|
||||
// IDFromString validates the ID and returns it in hexadecimal format.
|
||||
func IDFromString(s string) (string, error) {
|
||||
if len(s) > 16 {
|
||||
return "", fmt.Errorf("ID cannot be longer than 16 hex characters: %s", s)
|
||||
@@ -248,5 +248,5 @@ func IDFromString(s string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return strconv.FormatUint(id, 10), nil
|
||||
return strconv.FormatUint(id, 16), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user