Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Push host metadata on startup #65
Push host metadata on startup #65
Changes from 2 commits
5a715dc
95a4c5c
61d67fa
dc36058
e29dd46
1314caa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Not a blocker for this PR, but we should investigate if we also need here all the options that the Agent passes as
Transport
on its http client. Maybe @olivielpeau can give his opinion on this. Links to the relevant parts in the Agent code:newHTTPClient()
which callsCreateHTTPTransport()
:https://github.com/DataDog/datadog-agent/blob/012a209d3acecf96fa74236cc5fc5a6d028a4daf/pkg/forwarder/worker.go#L55-L63
CreateHTTPTransport()
:https://github.com/DataDog/datadog-agent/blob/012a209d3acecf96fa74236cc5fc5a6d028a4daf/pkg/util/http/transport.go#L21-L55
This git blame might help us track why they were added in the Agent: https://github.com/DataDog/datadog-agent/blame/7305c07eaf917f63274749dfdd96119b0b713883/pkg/util/common.go
Eg: the PR that disables FallbackDelay mentions "Some concerns have been raised about the effect this might have on the intake."
Also, the proxy settings are probably something we also want.
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.
the zero value for the
http.Client
useshttp.DefaultTransport
that differs from theTransport
the Agent uses in:FallBackDelay
being disabled in the Agent,MaxIdleConnsPerHost
set to 5 in the Agent instead of the default of 2,I think we should keep (4) as is and maybe change (1)/(2)/(3) depending on what Agent Core says. If we change (1)/(2)/(3) we should also change it on the metrics exporter client which uses the default client (maybe on zorkian's library?).
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.
Being consistent with how the proxy is configured everywhere else makes sense, I think
MaxIdleConnsPerHost
shouldn't matter and disabling TLS is not something we need to allow. The only thing then isFallBackDelay
, which I don't understand why was disabled in the Agent... but it can't be that bad if it's the default in Go :)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.
MaxIdleConnsPerHost
set to5
or2
isn't that important, unless we expect a lot of concurrent connections to Datadog's intake from this client (not the case here), we want to use Go's default here, I think it changed across Go versions and we haven't updated it yet indatadog-agent
.datadog-agent
, but there's an opt-in to disable certificate validation, which can be useful for some specific proxy settings. There's also an option to force TLS 1.2 and up on the client side, which is a client-side enforcement some users require. Such settings may not be required now, but may be asked in the future.Proxy
field toProxyFromEnvironments
.Also,
HTTP/2
is not enabled on most intake endpoints at the moment, so you can leaveForceAttemptHTTP2
tofalse
.