Skip to content
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

Allow DDTracerResolver to be disabled. #415

Merged
merged 2 commits into from
Jul 31, 2018
Merged

Conversation

tylerbenson
Copy link
Contributor

Fixes #408

@jeacott1
Copy link

thanks. this looks like it will still auto create a NoopTracer though in the case that
dd.trace.resolver.enabled=false.

perhaps it would be better to not generate or register anything at all here?

}
return Collections.unmodifiableMap(map);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a dedicated test coverage for this class, especially considering that it is now public.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the tests in DDTraceConfigTest still apply. I'm going to leave it as is for now to avoid further conflicts with your PR.

@tylerbenson
Copy link
Contributor Author

@jeacott1 the registerTracer method that returns a NoopTracer is one we've added. The method called by TraceResolver will just return null when disabled, which I believe is the behavior you're looking for.

Copy link
Contributor

@realark realark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jeacott1
Copy link

ah, ok. I thought something else was calling registerTracer so one would be created regardless.
looks ok.

Copy link

@jeacott1 jeacott1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks to do the job :)

@tylerbenson tylerbenson merged commit 8dd87a8 into master Jul 31, 2018
@tylerbenson tylerbenson deleted the tyler/resolver-config branch July 31, 2018 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants