Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Add timeout between the agent and the backend #315

Merged
merged 3 commits into from
Sep 25, 2017
Merged

Add timeout between the agent and the backend #315

merged 3 commits into from
Sep 25, 2017

Conversation

gabsn
Copy link

@gabsn gabsn commented Sep 20, 2017

  • on staging since 20/09/2017, 11h39

@gabsn gabsn requested a review from talwai September 20, 2017 15:10
@@ -62,7 +62,9 @@ func NewAPIEndpoint(url, apiKey string) *APIEndpoint {
ae := APIEndpoint{
apiKey: apiKey,
url: url,
client: http.DefaultClient,
client: &http.Client{
Timeout: 10 * time.Second,
Copy link

Choose a reason for hiding this comment

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

use a constant. Also this setting will be overriden when we use a proxy, so we need to update it here https://github.com/DataDog/datadog-trace-agent/pull/315/files#L83-L87

@@ -15,6 +15,9 @@ import (
"github.com/DataDog/datadog-trace-agent/watchdog"
)

// timeout is used by the agent to release pressure on the backend
Copy link

Choose a reason for hiding this comment

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

change the comment

// timeout is the HTTP timeout for POST requests to the Datadog backend

@gabsn gabsn merged commit e3d3525 into master Sep 25, 2017
@LotharSee LotharSee deleted the gabin/timeout branch November 2, 2017 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants