Skip to content

Commit

Permalink
Upgrades JMXFetch and adds config option to control statsd blocking m…
Browse files Browse the repository at this point in the history
…ode (#16602)

* Upgrades JMXFetch and adds config option to control statsd blocking mode (#16364)

Update releasenotes/notes/jmxfetch-0.47.6-52ab4c3b6b877cd2.yaml
Co-authored-by: DeForest Richards <[email protected]>
Exposes two more jmxfetch statsd client config settings, socket buffer size and socket timeout
Updates jmxfetch cli arg names
Update JMXFetch to 0.47.7
Updates releasenote for jmxfetch
Updated sha256 for JMXFetch 0.47.8

* [CI] Disable `codecov` in the CI because its Python package disappeared from Pypi (#16549)

This PR stops using codecov in the Github Actions CI.

The Python codecov uploader we use was deprecated on Feb 1, 2022 and completely disappeared from Pypi on Apr 12, 2023.

Co-authored-by: Kylian Serrania <[email protected]>

---------

Co-authored-by: Scott Opell <[email protected]>
Co-authored-by: Alexandre Menasria <[email protected]>
Co-authored-by: Kylian Serrania <[email protected]>
  • Loading branch information
4 people authored Apr 14, 2023
1 parent ea052bb commit 528a800
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .circleci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
black==22.10.0
codecov==2.1.12
# The Codecov Python uploader was deprecated on Feb 1, 2022 and disappeared from PyPi on Apr 12, 2023.
# codecov==2.1.12
flake8-bugbear==22.10.27
flake8-comprehensions==3.10.1
flake8-unused-arguments==0.0.12
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/windows-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
run: |
$ErrorActionPreference = 'Stop';
# install dependencies
python -m pip install codecov -r requirements.txt
# The Codecov Python uploader was deprecated on Feb 1, 2022 and disappeared from PyPi on Apr 12, 2023.
# python -m pip install codecov
python -m pip install -r requirements.txt
If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
inv -e install-tools
If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
Expand All @@ -59,5 +61,6 @@ jobs:
inv -e rtloader.install
# FIXME: skipping rtloader tests because they fail with a DLL-not-found error
# inv -e rtloader.test
inv -e test --rerun-fails=2 --python-runtimes 3 --coverage --profile --python-home-3=$pythonLocation
inv -e codecov
inv -e test --skip-linters --rerun-fails=2 --python-runtimes 3 --coverage --profile --python-home-3=$pythonLocation
# The Codecov Python uploader was deprecated on Feb 1, 2022 and disappeared from PyPi on Apr 12, 2023.
# inv -e codecov
7 changes: 6 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,14 @@ func InitConfig(config Config) {
config.BindEnvAndSetDefault("jmx_check_period", int(defaults.DefaultCheckInterval/time.Millisecond))
config.BindEnvAndSetDefault("jmx_reconnection_timeout", 60)
config.BindEnvAndSetDefault("jmx_statsd_telemetry_enabled", false)
// this is an internal setting and will not be documented in the config template.
// The following jmx_statsd_client-* options are internal and will not be documented
// the queue size is the no. of elements (metrics, event, service checks) it can hold.
config.BindEnvAndSetDefault("jmx_statsd_client_queue_size", 4096)
config.BindEnvAndSetDefault("jmx_statsd_client_use_non_blocking", false)
// the "buffer" here is the socket send buffer (SO_SNDBUF) and the size is in bytes
config.BindEnvAndSetDefault("jmx_statsd_client_buffer_size", 0)
// the socket timeout (SO_SNDTIMEO) is in milliseconds
config.BindEnvAndSetDefault("jmx_statsd_client_socket_timeout", 0)

// Go_expvar server port
config.BindEnvAndSetDefault("expvar_port", "5000")
Expand Down
12 changes: 12 additions & 0 deletions pkg/jmxfetch/jmxfetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ func (j *JMXFetch) Start(manage bool) error {
subprocessArgs = append(subprocessArgs, "--statsd_telemetry")
}

if config.Datadog.GetBool("jmx_statsd_client_use_non_blocking") {
subprocessArgs = append(subprocessArgs, "--statsd_nonblocking")
}

if bufSize := config.Datadog.GetInt("jmx_statsd_client_buffer_size"); bufSize != 0 {
subprocessArgs = append(subprocessArgs, "--statsd_buffer_size", fmt.Sprintf("%d", bufSize))
}

if socketTimeout := config.Datadog.GetInt("jmx_statsd_client_socket_timeout"); socketTimeout != 0 {
subprocessArgs = append(subprocessArgs, "--statsd_socket_timeout", fmt.Sprintf("%d", socketTimeout))
}

if config.Datadog.GetBool("log_format_rfc3339") {
subprocessArgs = append(subprocessArgs, "--log_format_rfc3339")
}
Expand Down
18 changes: 9 additions & 9 deletions release.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"INTEGRATIONS_CORE_VERSION": "7.43.x",
"OMNIBUS_SOFTWARE_VERSION": "7.43.x",
"OMNIBUS_RUBY_VERSION": "7.43.x",
"JMXFETCH_VERSION": "0.47.2",
"JMXFETCH_HASH": "92f9c744fe00c13c6401829b9eb50f44c5843ae9d1a14f7618531bdf0187e44f",
"JMXFETCH_VERSION": "0.47.8",
"JMXFETCH_HASH": "aff48a7589b507fd41367686f15307005d498d94a260efbc771963cedd52f16f",
"MACOS_BUILD_VERSION": "7.43.x",
"WINDOWS_DDNPM_DRIVER": "release-signed",
"WINDOWS_DDNPM_VERSION": "2.3.0",
Expand All @@ -20,8 +20,8 @@
"INTEGRATIONS_CORE_VERSION": "7.43.x",
"OMNIBUS_SOFTWARE_VERSION": "7.43.x",
"OMNIBUS_RUBY_VERSION": "7.43.x",
"JMXFETCH_VERSION": "0.47.2",
"JMXFETCH_HASH": "92f9c744fe00c13c6401829b9eb50f44c5843ae9d1a14f7618531bdf0187e44f",
"JMXFETCH_VERSION": "0.47.8",
"JMXFETCH_HASH": "aff48a7589b507fd41367686f15307005d498d94a260efbc771963cedd52f16f",
"MACOS_BUILD_VERSION": "7.43.x",
"WINDOWS_DDNPM_DRIVER": "release-signed",
"WINDOWS_DDNPM_VERSION": "2.3.0",
Expand All @@ -32,8 +32,8 @@
"INTEGRATIONS_CORE_VERSION": "7.43.1",
"OMNIBUS_SOFTWARE_VERSION": "7.43.0",
"OMNIBUS_RUBY_VERSION": "7.43.0",
"JMXFETCH_VERSION": "0.47.2",
"JMXFETCH_HASH": "92f9c744fe00c13c6401829b9eb50f44c5843ae9d1a14f7618531bdf0187e44f",
"JMXFETCH_VERSION": "0.47.8",
"JMXFETCH_HASH": "aff48a7589b507fd41367686f15307005d498d94a260efbc771963cedd52f16f",
"SECURITY_AGENT_POLICIES_VERSION": "v0.43.1",
"MACOS_BUILD_VERSION": "6.43.0",
"WINDOWS_DDNPM_DRIVER": "release-signed",
Expand All @@ -44,8 +44,8 @@
"INTEGRATIONS_CORE_VERSION": "7.43.1",
"OMNIBUS_SOFTWARE_VERSION": "7.43.0",
"OMNIBUS_RUBY_VERSION": "7.43.0",
"JMXFETCH_VERSION": "0.47.2",
"JMXFETCH_HASH": "92f9c744fe00c13c6401829b9eb50f44c5843ae9d1a14f7618531bdf0187e44f",
"JMXFETCH_VERSION": "0.47.8",
"JMXFETCH_HASH": "aff48a7589b507fd41367686f15307005d498d94a260efbc771963cedd52f16f",
"SECURITY_AGENT_POLICIES_VERSION": "v0.43.1",
"MACOS_BUILD_VERSION": "7.43.0",
"WINDOWS_DDNPM_DRIVER": "release-signed",
Expand Down Expand Up @@ -82,4 +82,4 @@
"dca-1.9.0": {
"SECURITY_AGENT_POLICIES_VERSION": "v0.3"
}
}
}
12 changes: 12 additions & 0 deletions releasenotes/notes/jmxfetch-0.47.8-52ab4c3b6b877cd2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Each section from every release note are combined when the
# CHANGELOG.rst is rendered. So the text needs to be worded so that
# it does not depend on any information only available in another
# section. This may mean repeating some details, but each section
# must be readable independently of the other.
#
# Each section note must be formatted as reStructuredText.
---
enhancements:
- |
Upgraded JMXFetch to ``0.47.8`` which has improvements aimed
to help large metric collections drop fewer payloads.

0 comments on commit 528a800

Please sign in to comment.