-
Notifications
You must be signed in to change notification settings - Fork 327
Remove charset restrictions on tag values #639
Remove charset restrictions on tag values #639
Conversation
1af793d
to
e908e49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you @Ramonza, just some minor comments but otherwise LGTM!
tag/validate.go
Outdated
@@ -52,5 +52,5 @@ func checkValue(v string) bool { | |||
if len(v) > maxKeyLength { | |||
return false | |||
} | |||
return isASCII(v) | |||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we can fold this entirely into
func checkValue(v string) bool {
return len(v) <= maxKeyLength
}
Insert(k5, "v\x19"), | ||
Upsert(k5, "v\x19"), | ||
Update(k5, "v\x19"), | ||
Insert(k5, strings.Repeat("x", 256)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this could be a test of its own since the restriction being newly tested is len(v) <= 255
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added t.Run, so it should appear as it's own test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks. LGTM!
e908e49
to
ee94ce0
Compare
See: census-instrumentation/opencensus-specs#71