这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@gbrayut
Copy link
Contributor

@gbrayut gbrayut commented Aug 20, 2016

No description provided.

@gbrayut
Copy link
Contributor Author

gbrayut commented Aug 20, 2016

Not ready to merge yet, as I plan on testing on a few systems for a while first.

@gbrayut
Copy link
Contributor Author

gbrayut commented Aug 24, 2016

This is working now and ready for review. I am going to test it on a few systems to make sure the new 60s timeout doesn't cause any issues.

Fixes #1879

@gbrayut
Copy link
Contributor Author

gbrayut commented Aug 24, 2016

I added another commit that will set the UA for the collect package when used in tsdbrelay and bosun. I'll also test these on my VM.

UseNtlm bool = false

// DefaultClient can be used to override the HTTP client that will be used to make requests.
DefaultClient *http.Client
Copy link
Contributor

Choose a reason for hiding this comment

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

This is kinda wierd to me. Collect already has an odd client with a ghetto timeout thing (that looks buggy to me). Can we just have a central utility that sets http.DefaultClient?

Something like util.SetupHttpClient(appName, msg, features...)?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather collect never had to know anything about http clients, and can just Get and Post to its heart's content.

@captncraig
Copy link
Contributor

In general, it looks pretty good. I'd just like to reduce some of the duplicated code if possible.

@gbrayut
Copy link
Contributor Author

gbrayut commented Aug 25, 2016

After speaking with Craig the new commits remove the client code from collect (just use collect.DefaultClient to override) and update the scollector/docs.go file. We decided against a util function, since bosun already requires a custom transport and we may need to add additional custom headers in scollector/tsdbrelay the future.

I'll test on a few systems then merge this to master.

@gbrayut gbrayut merged commit c1d4c83 into master Aug 25, 2016
@gbrayut gbrayut deleted the scollector branch August 25, 2016 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants