-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Added Tag Configuration Support Lightstep Tracing #4175
Added Tag Configuration Support Lightstep Tracing #4175
Conversation
8af7d99
to
c2cb109
Compare
I'm not sure if this test is flakey or if this is a real issue... it seems the tests failed at reloading?
|
Yep, this manifest is missing from quay: I think this PR broke it: #4171 |
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.
Nice, thanks! Can we add test before merging?
The e2e issue is not related, fixing this in another place: #4202
// - comma separated list of key=value | ||
// - value can be specified using the notation ${envVar:defaultValue}, where `envVar` | ||
// is an environment variable and `defaultValue` is the value to use in case the env var is not set. | ||
func parseTags(sTags string) opentracing.Tags { |
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.
Can we have a quick unit-test for it? (:
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.
I was thinking about that 😜 But there aren't any other unit tests in the tracing package (except stackdriver), so I figured it didn't make sense to break that ground for this simple change.
Should we add in a testing file and scaffolding for this?
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.
Scratch all that... I went ahead and added testing. PTAL
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.
Haaa, yea, something pragmatic would work, e.g just testing parsting tags (: Like what you did! Thanks!
Can you rebase? #4202 was merged 🤗 |
Signed-off-by: midnightconman <midnightconman@gmail.com>
Signed-off-by: midnightconman <midnightconman@gmail.com>
Signed-off-by: midnightconman <midnightconman@gmail.com>
7d23dda
to
4af605c
Compare
Signed-off-by: midnightconman <midnightconman@gmail.com>
434e1b8
to
57e3e01
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.
LGTM, amazing!
// - comma separated list of key=value | ||
// - value can be specified using the notation ${envVar:defaultValue}, where `envVar` | ||
// is an environment variable and `defaultValue` is the value to use in case the env var is not set. | ||
func parseTags(sTags string) opentracing.Tags { |
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.
Haaa, yea, something pragmatic would work, e.g just testing parsting tags (: Like what you did! Thanks!
|
||
testingData := []testData{ | ||
{ | ||
description: `A very simple case, key "foo" and value "bar"`, |
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.
amazing 🤗
|
||
os.Setenv("_TEST_PARSE_TAGS", "env-bar") | ||
for _, test := range testingData { | ||
t.Logf("testing %s\n", test.description) |
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 is not a biggy, but we can use t.Run
for consistency instead this (: But that's fine for now, for this PR, just let's remember for next one
Signed-off-by: midnightconman midnightconman@gmail.com
Changes
Fixes: #4148
Adds support to the configuration of the lightstep tracing client to send arbitrary tags to lightstep. The interface matches the interface for the Jaeger tracing config (comma-delimited string with key value pairs delimited by
=
, which also supports environment variables). An example would be:Verification
This was tested via
make test
.