-
Notifications
You must be signed in to change notification settings - Fork 197
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
[Bugfix] apm.DefaultTracer misbehaves when transport configuration is invalid #1618
Conversation
…rt the case where invalid tracer config
…of invalid configuration
tracer_test.go
Outdated
@@ -597,17 +597,11 @@ func TestTracerDefaultTransport(t *testing.T) { | |||
require.Error(t, err) | |||
assert.EqualError(t, err, "failed to parse ELASTIC_APM_SERVER_TIMEOUT: invalid duration never") | |||
|
|||
// Implicitly created Tracers will have a discard tracer. | |||
|
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'd recommend running the go linter locally. This additional new line is not necessary.
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.
You will also want to run the tests locally, as they currently are failing.
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.
hi @dmathieu, I did run test before raising the PR and again. As per the code DefaultTracer is being used in three places and I ran the UT's and they are working fine
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.
make test
did fail consistently in CI, as well as locally here.
This was because the tracecontext example relies on a discarded tracer.
But now, it had an inactive one (though this was due to previous tests). I've fixed it.
run docs-build |
This PR aims to fix amp.DefaultTracer misbehaves if transport specific configuration invalid, Incase of invalid config It will make transport inactive instead passing DiscardTransport