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

Jolokia configurable HTTP timeouts #2097 #2098

Merged
merged 2 commits into from
Dec 21, 2016
Merged

Jolokia configurable HTTP timeouts #2097 #2098

merged 2 commits into from
Dec 21, 2016

Conversation

Dominick1993
Copy link
Contributor

@Dominick1993 Dominick1993 commented Nov 28, 2016

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

@sparrc sparrc added this to the 1.2.0 milestone Nov 28, 2016
Copy link
Contributor

@sparrc sparrc left a comment

Choose a reason for hiding this comment

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

Please decrease the verbosity and use internal.Duration data types, so that these can be written as string durations ("3s")

see latest version of the rabbitmq plugin that I assume this was pulled from: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/rabbitmq/rabbitmq.go#L156-L164

Copy link
Contributor

@sparrc sparrc left a comment

Choose a reason for hiding this comment

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

changes requested, and also rebase

"github.com/influxdata/telegraf/plugins/inputs"
)

// Default http timeouts
const DefaultResponseHeaderTimeout = 3
Copy link
Contributor

Choose a reason for hiding this comment

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

just make these time.Duration objects directly, rather than converting to seconds below

## writing the request (including its body, if any). This
## time does not include the time to read the response body.
## See http.Transport.ResponseHeaderTimeout
# responseHeaderTimeout = 3
Copy link
Contributor

Choose a reason for hiding this comment

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

these should match the time format ("3s" and "4s"), and they should be response_header_timeout and client_timeout.

## writing the request (including its body, if any). This
## time does not include the time to read the response body.
## See http.Transport.ResponseHeaderTimeout
# responseHeaderTimeout = "3s"
Copy link
Contributor

Choose a reason for hiding this comment

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

should be response_header_timeout

## Client. The timeout includes connection time, any
## redirects, and reading the response body.
## See http.Client.Timeout
# clientTimeout = "4s"
Copy link
Contributor

Choose a reason for hiding this comment

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

should be client_timeout

## Optional http timeouts
##
## ResponseHeaderTimeout, if non-zero, specifies the amount of
## time to wait for a server's response headers after fully
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 too much writing, decrease the verbosity of this to match the rabbitmq plugin (you'll need to update master to see it)

@sparrc sparrc merged commit 37bc9cf into influxdata:master Dec 21, 2016
@Dominick1993 Dominick1993 deleted the jolokia_configurable_timeouts branch December 21, 2016 12:56
njwhite pushed a commit to njwhite/telegraf that referenced this pull request Jan 31, 2017
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.

2 participants