-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ddtrace/tracer: updated DD_TAGS parsing to support space separation #837
Conversation
DD_TAGS were split by commas only. Unless there is a comma in a string, tag list will be split by spaces. In either case, commas/spaces will be trimmed.
ddtrace/tracer/option_test.go
Outdated
in: "a,1", | ||
expected: map[string]string{ | ||
"a": "", | ||
"1": ""}, |
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.
This curly brace should also go on the next line everywhere. Sorry if my initial message was unclear.
ddtrace/tracer/option_test.go
Outdated
os.Setenv("DD_TAGS", tag.in) | ||
c := newConfig() | ||
for key, expected := range tag.expected { | ||
actual, ok := c.globalTags[key] |
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.
actual, ok := c.globalTags[key] | |
v, ok := c.globalTags[key] |
Can we please use v
or got
?
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.
v is used everywhere above, so I did not change that
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.
What do you mean?
Refactored parsing tests, removed comma trimming in the profiler/options.go.
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.
Looks perfect to me. CI is not passing though, there's one check you missed....
DD_TAGS were split by commas only. Unless there is a comma in a string, tag list will be split by spaces. In either case, commas/spaces will be trimmed.