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

Adding Spring properties integration to handle configuration #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Diagoras
Copy link

@Diagoras Diagoras commented Jan 2, 2019

This change allows external configuration of the Datadog reporter, with most of the properties and their namespaces hijacked from the Zipkin reporter's in Spring Sleuth.

BTW, how would you feel about adding Issues to this GitHub repo? Might make it easier to propose and discuss changes before opening PRs.

@matelang
Copy link

matelang commented Jan 3, 2019

Hi @Diagoras ,

thanks a lot for the PR, any contribution is welcome.
I am going to enable Issues and we'll review this PR a bit later - still swamped by emails from the Xmas holiday.

Cheers.

@Diagoras
Copy link
Author

Diagoras commented Jan 3, 2019

@matelang Absolutely, no worries. Thanks for supporting this integration!

/**
* Report traces to the configured Datadog Agent.
*
* @param host (See DDApi.DEFAULT_HOSTNAME)
* @param port (See DDApi.DEFAULT_PORT)
*/
public DatadogReporter(String host, int port) {
this(host, port, new LinkedBlockingQueue<>());
public DatadogReporter(String host, int port, int messageTimeout) {

Choose a reason for hiding this comment

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

Maybe it would be better to pass the entire DatadogProperties class to the constructor. Also have a default constructor that creates a DatadogProperties object with the default values.

Copy link
Author

Choose a reason for hiding this comment

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

@ambrusadrianz That would be nice, but unfortunately would require establishing a dependency from this module to "zipkin-datadog-reporter-autoconfigure". I think that's the reason why the default Zipkin reporter for Spring Sleuth also implements the constructor this way.

@ambrusadrianz
Copy link

ambrusadrianz commented Jan 10, 2019

Hi @Diagoras,

Thanks for the PR. I left some comments, just some minor, nitpicks otherwise looks good. Thanks a lot for your PR.

Cheers.

@Diagoras
Copy link
Author

Diagoras commented Mar 8, 2019

@matelang @ambrusadrianz Anything else needed, or do you think this LGTM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants