From 66a3741a7feafb4cc268c0c4494af36acd418386 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:45:41 +0000 Subject: [PATCH 01/15] Bump ruff from 0.7.4 to 0.8.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.4 to 0.8.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.4...0.8.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.in b/requirements-dev.in index 5b3a8da82..1ba83ae21 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -6,5 +6,5 @@ pytest-timeout==2.3.1 pylint==3.3.1 randomname==0.2.1 requests-mock==1.12.1 -ruff==0.7.4 +ruff==0.8.0 parameterized==0.9.0 From 48af06d94e995dc11197c4e4c04b4feadbaa8aac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:07:31 +0000 Subject: [PATCH 02/15] Bump cryptography from 43.0.3 to 44.0.0 Bumps [cryptography](https://github.com/pyca/cryptography) from 43.0.3 to 44.0.0. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/43.0.3...44.0.0) --- updated-dependencies: - dependency-name: cryptography dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 737cf86b6..d33e94c87 100644 --- a/requirements.in +++ b/requirements.in @@ -1,6 +1,6 @@ backoff==2.2.1 certifi==2024.8.30 -cryptography==43.0.3 +cryptography==44.0.0 distro==1.9.0 httplib2==0.22.0 jinja2==3.1.4 diff --git a/requirements.txt b/requirements.txt index 5ea2a61cf..aaca37ac7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ cffi==1.14.4 # via cryptography charset-normalizer==2.0.3 # via requests -cryptography==43.0.3 +cryptography==44.0.0 # via -r requirements.in distro==1.9.0 # via -r requirements.in From bb9d0fd4eebccef40cd33abcb7aaccbc334487d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:19:30 +0000 Subject: [PATCH 03/15] Bump pytest from 8.3.3 to 8.3.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.3 to 8.3.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...8.3.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.in b/requirements-dev.in index 1ba83ae21..2b7489e19 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -1,6 +1,6 @@ click==8.1.7 idna==3.10 -pytest==8.3.3 +pytest==8.3.4 pytest-timer==1.0.0 pytest-timeout==2.3.1 pylint==3.3.1 From a1f154c06ff9a428f08b5d5afa594c0b5c04f372 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:37:34 +0000 Subject: [PATCH 04/15] Bump certifi from 2024.8.30 to 2024.12.14 Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.8.30 to 2024.12.14. - [Commits](https://github.com/certifi/python-certifi/compare/2024.08.30...2024.12.14) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index d33e94c87..3518156b8 100644 --- a/requirements.in +++ b/requirements.in @@ -1,5 +1,5 @@ backoff==2.2.1 -certifi==2024.8.30 +certifi==2024.12.14 cryptography==44.0.0 distro==1.9.0 httplib2==0.22.0 diff --git a/requirements.txt b/requirements.txt index aaca37ac7..923f9bb42 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ antlr4-python3-runtime==4.9.3 # via omegaconf backoff==2.2.1 # via -r requirements.in -certifi==2024.8.30 +certifi==2024.12.14 # via # -r requirements.in # requests From 40c76af1c048ec198388b19ad65e19d4d9e83d8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:54:21 +0000 Subject: [PATCH 05/15] Bump ruff from 0.8.0 to 0.8.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.0 to 0.8.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.0...0.8.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.in b/requirements-dev.in index 2b7489e19..d2995cd3e 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -6,5 +6,5 @@ pytest-timeout==2.3.1 pylint==3.3.1 randomname==0.2.1 requests-mock==1.12.1 -ruff==0.8.0 +ruff==0.8.3 parameterized==0.9.0 From e1659dade846ee57bfb8cda9b41c0b8f4d34b15d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 21:19:56 +0000 Subject: [PATCH 06/15] Bump pylint from 3.3.1 to 3.3.2 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.in b/requirements-dev.in index d2995cd3e..ba18f833b 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -3,7 +3,7 @@ idna==3.10 pytest==8.3.4 pytest-timer==1.0.0 pytest-timeout==2.3.1 -pylint==3.3.1 +pylint==3.3.2 randomname==0.2.1 requests-mock==1.12.1 ruff==0.8.3 From 94ef5d7d542e62bb3f2059c35ca7ec2ffb5b57ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:47:54 +0000 Subject: [PATCH 07/15] Bump jinja2 from 3.1.4 to 3.1.5 Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 3518156b8..e4f3b54a4 100644 --- a/requirements.in +++ b/requirements.in @@ -3,7 +3,7 @@ certifi==2024.12.14 cryptography==44.0.0 distro==1.9.0 httplib2==0.22.0 -jinja2==3.1.4 +jinja2==3.1.5 omegaconf==2.3.0 psycopg2-binary==2.9.10 pyyaml==6.0.2 diff --git a/requirements.txt b/requirements.txt index 923f9bb42..c7c243ac8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,7 @@ httplib2==0.22.0 # via -r requirements.in idna==3.10 # via requests -jinja2==3.1.4 +jinja2==3.1.5 # via -r requirements.in markupsafe==2.0.1 # via jinja2 From b6e75794d956f8f044b9d4d425b8cc0123e36663 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:20:39 +0000 Subject: [PATCH 08/15] Bump urllib3 from 2.2.3 to 2.3.0 Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.3 to 2.3.0. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.2.3...2.3.0) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index e4f3b54a4..28bd41720 100644 --- a/requirements.in +++ b/requirements.in @@ -8,4 +8,4 @@ omegaconf==2.3.0 psycopg2-binary==2.9.10 pyyaml==6.0.2 requests==2.32.3 -urllib3==2.2.3 +urllib3==2.3.0 diff --git a/requirements.txt b/requirements.txt index c7c243ac8..38b19b359 100644 --- a/requirements.txt +++ b/requirements.txt @@ -42,7 +42,7 @@ pyyaml==6.0.2 # omegaconf requests==2.32.3 # via -r requirements.in -urllib3==2.2.3 +urllib3==2.3.0 # via # -r requirements.in # requests From 806e8be596f28a399fa968744acb0f6752f9ec42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:38:12 +0000 Subject: [PATCH 09/15] Bump click from 8.1.7 to 8.1.8 Bumps [click](https://github.com/pallets/click) from 8.1.7 to 8.1.8. - [Release notes](https://github.com/pallets/click/releases) - [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/click/compare/8.1.7...8.1.8) --- updated-dependencies: - dependency-name: click dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.in b/requirements-dev.in index ba18f833b..464e7bfb7 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -1,4 +1,4 @@ -click==8.1.7 +click==8.1.8 idna==3.10 pytest==8.3.4 pytest-timer==1.0.0 From 83232bd7b0d6269ae8a456152c811c5b0cc57895 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:57:40 +0000 Subject: [PATCH 10/15] Bump ruff from 0.8.3 to 0.8.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.3 to 0.8.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.3...0.8.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.in b/requirements-dev.in index 464e7bfb7..3daa10dca 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -6,5 +6,5 @@ pytest-timeout==2.3.1 pylint==3.3.2 randomname==0.2.1 requests-mock==1.12.1 -ruff==0.8.3 +ruff==0.8.4 parameterized==0.9.0 From 877622a3d9918abbb72fd114ea8f32c20c26e716 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 14:07:49 +0000 Subject: [PATCH 11/15] Bump pylint from 3.3.2 to 3.3.3 Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.2...v3.3.3) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.in b/requirements-dev.in index 3daa10dca..a70641135 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -3,7 +3,7 @@ idna==3.10 pytest==8.3.4 pytest-timer==1.0.0 pytest-timeout==2.3.1 -pylint==3.3.2 +pylint==3.3.3 randomname==0.2.1 requests-mock==1.12.1 ruff==0.8.4 From 4b617d13a138f74c3d2b96f5a3f1cd2e774f0a50 Mon Sep 17 00:00:00 2001 From: ekremsekerci Date: Tue, 21 Jan 2025 13:42:13 +0100 Subject: [PATCH 12/15] Upgrade appdynamics java and machine agents to version 14.12.0 --- dependencies.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dependencies.yml b/dependencies.yml index a8d1a9116..eba749437 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -2,11 +2,11 @@ dependencies: appdynamics: agent: - artifact: appdynamics/appdynamics-agent-1.8-{{ version }}.zip - version: 24.4.1 + artifact: appdynamics/AppServerAgent-1.8-{{ version }}.zip + version: 24.12.0.36528 machine-agent: - artifact: appdynamics/appdynamics-machineagent-bundle-{{ version }}.zip - version: 24.4.0 + artifact: appdynamics/machineagent-bundle-64bit-linux-{{ version }}.zip + version: 24.12.0.4485 databroker: debezium: artifact: experimental/databroker/debezium-{{ version }}.tar.gz From 769298c9c6ed4f00f4fa15c9f21fee0627aaf058 Mon Sep 17 00:00:00 2001 From: Mukund Padale Date: Mon, 27 Jan 2025 12:27:52 +0530 Subject: [PATCH 13/15] feat: rollback to master --- requirements-dev.in | 8 ++++---- requirements.in | 8 ++++---- requirements.txt | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/requirements-dev.in b/requirements-dev.in index a70641135..5b3a8da82 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -1,10 +1,10 @@ -click==8.1.8 +click==8.1.7 idna==3.10 -pytest==8.3.4 +pytest==8.3.3 pytest-timer==1.0.0 pytest-timeout==2.3.1 -pylint==3.3.3 +pylint==3.3.1 randomname==0.2.1 requests-mock==1.12.1 -ruff==0.8.4 +ruff==0.7.4 parameterized==0.9.0 diff --git a/requirements.in b/requirements.in index 28bd41720..737cf86b6 100644 --- a/requirements.in +++ b/requirements.in @@ -1,11 +1,11 @@ backoff==2.2.1 -certifi==2024.12.14 -cryptography==44.0.0 +certifi==2024.8.30 +cryptography==43.0.3 distro==1.9.0 httplib2==0.22.0 -jinja2==3.1.5 +jinja2==3.1.4 omegaconf==2.3.0 psycopg2-binary==2.9.10 pyyaml==6.0.2 requests==2.32.3 -urllib3==2.3.0 +urllib3==2.2.3 diff --git a/requirements.txt b/requirements.txt index 38b19b359..5ea2a61cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ antlr4-python3-runtime==4.9.3 # via omegaconf backoff==2.2.1 # via -r requirements.in -certifi==2024.12.14 +certifi==2024.8.30 # via # -r requirements.in # requests @@ -16,7 +16,7 @@ cffi==1.14.4 # via cryptography charset-normalizer==2.0.3 # via requests -cryptography==44.0.0 +cryptography==43.0.3 # via -r requirements.in distro==1.9.0 # via -r requirements.in @@ -24,7 +24,7 @@ httplib2==0.22.0 # via -r requirements.in idna==3.10 # via requests -jinja2==3.1.5 +jinja2==3.1.4 # via -r requirements.in markupsafe==2.0.1 # via jinja2 @@ -42,7 +42,7 @@ pyyaml==6.0.2 # omegaconf requests==2.32.3 # via -r requirements.in -urllib3==2.3.0 +urllib3==2.2.3 # via # -r requirements.in # requests From 04b221e90ce4a875c41b7cdc1deca325666e8c75 Mon Sep 17 00:00:00 2001 From: ekremsekerci Date: Tue, 18 Feb 2025 15:28:07 +0100 Subject: [PATCH 14/15] Upgrade datadog agents to the latest versions (#849) Upgrade dd-trace-agent & datadog-cf-buildpack versions --- buildpack/core/runtime.py | 39 +++++++++++++++++++++++++-- dependencies.yml | 4 +-- etc/m2ee/m2ee.yaml | 6 ++--- etc/scripts/on_error.sh | 2 ++ etc/scripts/on_out_of_memory_error.sh | 2 ++ 5 files changed, 46 insertions(+), 7 deletions(-) create mode 100755 etc/scripts/on_error.sh create mode 100755 etc/scripts/on_out_of_memory_error.sh diff --git a/buildpack/core/runtime.py b/buildpack/core/runtime.py index a9e79c6a1..99396f049 100644 --- a/buildpack/core/runtime.py +++ b/buildpack/core/runtime.py @@ -68,6 +68,21 @@ def stage(buildpack_dir, build_path, cache_path): os.path.join(buildpack_dir, "etc", "m2ee", "m2ee.yaml"), os.path.join(build_path, ".local", "m2ee.yaml"), ) + + scripts_path_source = os.path.join(buildpack_dir, "etc", "scripts") + scripts_path_dest = os.path.join(build_path, ".local", "scripts") + shutil.copytree( + scripts_path_source, + scripts_path_dest, + dirs_exist_ok=True + ) + + # Add +x permission for all sh scripts + for root, _, files in os.walk(scripts_path_dest): + for file in files: + file_path = os.path.join(root, file) + util.set_executable(file_path) + resolve_runtime_dependency(buildpack_dir, build_path, cache_path) @@ -613,15 +628,35 @@ def _pre_process_m2ee_yaml(): "-i", f"s|BUILD_PATH|{os.getcwd()}|g; " f"s|RUNTIME_PORT|{util.get_runtime_port()}|; " - f"s|ADMIN_PORT|{util.get_admin_port()}|; " - f"s|PYTHONPID|{os.getpid()}|", + f"s|ADMIN_PORT|{util.get_admin_port()}|", ".local/m2ee.yaml", ] ) +def _pre_process_on_error_scripts(): + logging.debug("Preprocessing on error scripts...") + subprocess.check_call( + [ + "sed", + "-i", + f"s|PYTHONPID|{os.getpid()}|", + ".local/scripts/on_error.sh", + ] + ) + subprocess.check_call( + [ + "sed", + "-i", + f"s|PYTHONPID|{os.getpid()}|", + ".local/scripts/on_out_of_memory_error.sh", + ] + ) + + def setup(vcap_data): _pre_process_m2ee_yaml() + _pre_process_on_error_scripts() _activate_license() client = m2ee_class( diff --git a/dependencies.yml b/dependencies.yml index eba749437..c586a7839 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -21,10 +21,10 @@ dependencies: buildpack: alias: cf-datadog-sidecar artifact: datadog/datadog-cloudfoundry-buildpack-{{ version }}.zip - version: 4.37.0 + version: 4.42.0 trace-agent: artifact: datadog/dd-java-agent-{{ version }}.jar - version: 1.27.0 + version: 1.45.2 dynatrace: agent: artifact: "{{ url }}/e/{{ environment }}/api/v1/deployment/installer/agent/unix/paas/latest?include=java&bitness=64&Api-Token={{ token }}" diff --git a/etc/m2ee/m2ee.yaml b/etc/m2ee/m2ee.yaml index 26687b2ed..f0ca90770 100644 --- a/etc/m2ee/m2ee.yaml +++ b/etc/m2ee/m2ee.yaml @@ -22,9 +22,9 @@ m2ee: javaopts: [ "-Dfile.encoding=UTF-8", - "-Djava.io.tmpdir=BUILD_PATH/data/tmp", - "-XX:OnError=kill -s USR1 PYTHONPID", - "-XX:OnOutOfMemoryError=kill -s USR2 PYTHONPID", + "-Djava.io.tmpdir=/tmp", + "-XX:OnError=BUILD_PATH/.local/scripts/on_error.sh", + "-XX:OnOutOfMemoryError=BUILD_PATH/.local/scripts/on_out_of_memory_error.sh", ] jetty: diff --git a/etc/scripts/on_error.sh b/etc/scripts/on_error.sh new file mode 100755 index 000000000..05e111625 --- /dev/null +++ b/etc/scripts/on_error.sh @@ -0,0 +1,2 @@ +#!/bin/bash +kill -s USR1 PYTHONPID diff --git a/etc/scripts/on_out_of_memory_error.sh b/etc/scripts/on_out_of_memory_error.sh new file mode 100755 index 000000000..7f6501e32 --- /dev/null +++ b/etc/scripts/on_out_of_memory_error.sh @@ -0,0 +1,2 @@ +#!/bin/bash +kill -s USR2 PYTHONPID From 23e7b568dfb137b07a9043fc13985e05955cdb01 Mon Sep 17 00:00:00 2001 From: ekremsekerci Date: Tue, 18 Feb 2025 16:25:00 +0100 Subject: [PATCH 15/15] Rename custom jmx metrics (#854) feat: update custom jmx metrics' names. use 'mx' prefix instead of jmx so that the metrics are not considered as Datadog custom metrics --- buildpack/telemetry/datadog.py | 40 +++++++++++++++------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/buildpack/telemetry/datadog.py b/buildpack/telemetry/datadog.py index 026e3cdf6..bf68d359c 100644 --- a/buildpack/telemetry/datadog.py +++ b/buildpack/telemetry/datadog.py @@ -272,6 +272,9 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None): # and run app/.local/bin/java -jar ~/jmxterm.jar # # The extra attributes are only available from Mendix 7.15.0+ + # Note: aliases are added later to make the metrics available for free on + # Datadog as `mx` is a supported prefix. Before that, all these metrics were + # being indexed as custom metrics by Datadog which are not free. config = { "init_config": {}, "instances": [ @@ -287,9 +290,9 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None): # NamedUserSessions = 0; # AnonymousSessions = 0; "attribute": { - "NamedUsers": {"metrics_type": "gauge"}, - "NamedUserSessions": {"metrics_type": "gauge"}, - "AnonymousSessions": {"metrics_type": "gauge"}, + "NamedUsers": {"metrics_type": "gauge", "alias": "mx.com.mendix.named_users"}, + "NamedUserSessions": {"metrics_type": "gauge", "alias": "mx.com.mendix.named_user_sessions"}, + "AnonymousSessions": {"metrics_type": "gauge", "alias": "mx.com.mendix.anonymous_sessions"}, }, } }, @@ -302,11 +305,11 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None): # Deletes = 0; # Transactions = 25; "attribute": { - "Selects": {"metrics_type": "counter"}, - "Updates": {"metrics_type": "counter"}, - "Inserts": {"metrics_type": "counter"}, - "Deletes": {"metrics_type": "counter"}, - "Transactions": {"metrics_type": "counter"}, + "Selects": {"metrics_type": "counter", "alias": "mx.com.mendix.selects"}, + "Updates": {"metrics_type": "counter", "alias": "mx.com.mendix.updates"}, + "Inserts": {"metrics_type": "counter", "alias": "mx.com.mendix.inserts"}, + "Deletes": {"metrics_type": "counter", "alias": "mx.com.mendix.deletes"}, + "Transactions": {"metrics_type": "counter", "alias": "mx.com.mendix.transactions"}, }, } }, @@ -315,7 +318,9 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None): "bean": "com.mendix:type=General", # Languages = en_US; # Entities = 24; - "attribute": {"Entities": {"metrics_type": "gauge"}}, + "attribute": { + "Entities": {"metrics_type": "gauge", "alias": "mx.com.mendix.entities"}, + }, } }, { @@ -330,23 +335,14 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None): # ThreadsPriority = 5; # QueueSize = 0; "attribute": { - "Threads": {"metrics_type": "gauge"}, - "MaxThreads": {"metrics_type": "gauge"}, - "IdleThreads": {"metrics_type": "gauge"}, - "QueueSize": {"metrics_type": "gauge"}, + "Threads": {"metrics_type": "gauge", "alias": "mx.com.mendix.threads"}, + "MaxThreads": {"metrics_type": "gauge", "alias": "mx.com.mendix.max_threads"}, + "IdleThreads": {"metrics_type": "gauge", "alias": "mx.com.mendix.idle_threads"}, + "QueueSize": {"metrics_type": "gauge", "alias": "mx.com.mendix.queue_size"}, }, } }, ], - # }, { - # 'include': { - # 'bean': 'com.mendix:type=Jetty', - # # ConnectedEndPoints = 0; - # # IdleTimeout = 30000; - # # RequestsActiveMax = 0; - # 'attribute': { - # } - # }, } ], }