Skip to content

Commit 21fbe77

Browse files
mukund-padaledependabot[bot]jeohistekremsekercisailhenz
authored
Release 2025-02-20 (#855)
* 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](astral-sh/ruff@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] <[email protected]> * 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](pyca/cryptography@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] <[email protected]> * 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](pytest-dev/pytest@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] <[email protected]> * 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](certifi/python-certifi@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] <[email protected]> * 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](astral-sh/ruff@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] <[email protected]> * 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](pylint-dev/pylint@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] <[email protected]> * 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](pallets/jinja@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] <[email protected]> * 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](urllib3/urllib3@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] <[email protected]> * 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](pallets/click@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] <[email protected]> * 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](astral-sh/ruff@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] <[email protected]> * 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](pylint-dev/pylint@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] <[email protected]> * Upgrade appdynamics java and machine agents to version 14.12.0 * feat: rollback to master * Upgrade datadog agents to the latest versions (#849) Upgrade dd-trace-agent & datadog-cf-buildpack versions * 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 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joey den Broeder <[email protected]> Co-authored-by: ekremsekerci <[email protected]> Co-authored-by: Sanny Ramirez <[email protected]>
1 parent 361908b commit 21fbe77

File tree

6 files changed

+64
-29
lines changed

6 files changed

+64
-29
lines changed

buildpack/core/runtime.py

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ def stage(buildpack_dir, build_path, cache_path):
6868
os.path.join(buildpack_dir, "etc", "m2ee", "m2ee.yaml"),
6969
os.path.join(build_path, ".local", "m2ee.yaml"),
7070
)
71+
72+
scripts_path_source = os.path.join(buildpack_dir, "etc", "scripts")
73+
scripts_path_dest = os.path.join(build_path, ".local", "scripts")
74+
shutil.copytree(
75+
scripts_path_source,
76+
scripts_path_dest,
77+
dirs_exist_ok=True
78+
)
79+
80+
# Add +x permission for all sh scripts
81+
for root, _, files in os.walk(scripts_path_dest):
82+
for file in files:
83+
file_path = os.path.join(root, file)
84+
util.set_executable(file_path)
85+
7186
resolve_runtime_dependency(buildpack_dir, build_path, cache_path)
7287

7388

@@ -613,15 +628,35 @@ def _pre_process_m2ee_yaml():
613628
"-i",
614629
f"s|BUILD_PATH|{os.getcwd()}|g; "
615630
f"s|RUNTIME_PORT|{util.get_runtime_port()}|; "
616-
f"s|ADMIN_PORT|{util.get_admin_port()}|; "
617-
f"s|PYTHONPID|{os.getpid()}|",
631+
f"s|ADMIN_PORT|{util.get_admin_port()}|",
618632
".local/m2ee.yaml",
619633
]
620634
)
621635

622636

637+
def _pre_process_on_error_scripts():
638+
logging.debug("Preprocessing on error scripts...")
639+
subprocess.check_call(
640+
[
641+
"sed",
642+
"-i",
643+
f"s|PYTHONPID|{os.getpid()}|",
644+
".local/scripts/on_error.sh",
645+
]
646+
)
647+
subprocess.check_call(
648+
[
649+
"sed",
650+
"-i",
651+
f"s|PYTHONPID|{os.getpid()}|",
652+
".local/scripts/on_out_of_memory_error.sh",
653+
]
654+
)
655+
656+
623657
def setup(vcap_data):
624658
_pre_process_m2ee_yaml()
659+
_pre_process_on_error_scripts()
625660
_activate_license()
626661

627662
client = m2ee_class(

buildpack/telemetry/datadog.py

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None):
272272
# and run app/.local/bin/java -jar ~/jmxterm.jar
273273
#
274274
# The extra attributes are only available from Mendix 7.15.0+
275+
# Note: aliases are added later to make the metrics available for free on
276+
# Datadog as `mx` is a supported prefix. Before that, all these metrics were
277+
# being indexed as custom metrics by Datadog which are not free.
275278
config = {
276279
"init_config": {},
277280
"instances": [
@@ -287,9 +290,9 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None):
287290
# NamedUserSessions = 0;
288291
# AnonymousSessions = 0;
289292
"attribute": {
290-
"NamedUsers": {"metrics_type": "gauge"},
291-
"NamedUserSessions": {"metrics_type": "gauge"},
292-
"AnonymousSessions": {"metrics_type": "gauge"},
293+
"NamedUsers": {"metrics_type": "gauge", "alias": "mx.com.mendix.named_users"},
294+
"NamedUserSessions": {"metrics_type": "gauge", "alias": "mx.com.mendix.named_user_sessions"},
295+
"AnonymousSessions": {"metrics_type": "gauge", "alias": "mx.com.mendix.anonymous_sessions"},
293296
},
294297
}
295298
},
@@ -302,11 +305,11 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None):
302305
# Deletes = 0;
303306
# Transactions = 25;
304307
"attribute": {
305-
"Selects": {"metrics_type": "counter"},
306-
"Updates": {"metrics_type": "counter"},
307-
"Inserts": {"metrics_type": "counter"},
308-
"Deletes": {"metrics_type": "counter"},
309-
"Transactions": {"metrics_type": "counter"},
308+
"Selects": {"metrics_type": "counter", "alias": "mx.com.mendix.selects"},
309+
"Updates": {"metrics_type": "counter", "alias": "mx.com.mendix.updates"},
310+
"Inserts": {"metrics_type": "counter", "alias": "mx.com.mendix.inserts"},
311+
"Deletes": {"metrics_type": "counter", "alias": "mx.com.mendix.deletes"},
312+
"Transactions": {"metrics_type": "counter", "alias": "mx.com.mendix.transactions"},
310313
},
311314
}
312315
},
@@ -315,7 +318,9 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None):
315318
"bean": "com.mendix:type=General",
316319
# Languages = en_US;
317320
# Entities = 24;
318-
"attribute": {"Entities": {"metrics_type": "gauge"}},
321+
"attribute": {
322+
"Entities": {"metrics_type": "gauge", "alias": "mx.com.mendix.entities"},
323+
},
319324
}
320325
},
321326
{
@@ -330,23 +335,14 @@ def _get_runtime_jmx_config(extra_jmx_instance_config=None):
330335
# ThreadsPriority = 5;
331336
# QueueSize = 0;
332337
"attribute": {
333-
"Threads": {"metrics_type": "gauge"},
334-
"MaxThreads": {"metrics_type": "gauge"},
335-
"IdleThreads": {"metrics_type": "gauge"},
336-
"QueueSize": {"metrics_type": "gauge"},
338+
"Threads": {"metrics_type": "gauge", "alias": "mx.com.mendix.threads"},
339+
"MaxThreads": {"metrics_type": "gauge", "alias": "mx.com.mendix.max_threads"},
340+
"IdleThreads": {"metrics_type": "gauge", "alias": "mx.com.mendix.idle_threads"},
341+
"QueueSize": {"metrics_type": "gauge", "alias": "mx.com.mendix.queue_size"},
337342
},
338343
}
339344
},
340345
],
341-
# }, {
342-
# 'include': {
343-
# 'bean': 'com.mendix:type=Jetty',
344-
# # ConnectedEndPoints = 0;
345-
# # IdleTimeout = 30000;
346-
# # RequestsActiveMax = 0;
347-
# 'attribute': {
348-
# }
349-
# },
350346
}
351347
],
352348
}

dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ dependencies:
2121
buildpack:
2222
alias: cf-datadog-sidecar
2323
artifact: datadog/datadog-cloudfoundry-buildpack-{{ version }}.zip
24-
version: 4.37.0
24+
version: 4.42.0
2525
trace-agent:
2626
artifact: datadog/dd-java-agent-{{ version }}.jar
27-
version: 1.27.0
27+
version: 1.45.2
2828
dynatrace:
2929
agent:
3030
artifact: "{{ url }}/e/{{ environment }}/api/v1/deployment/installer/agent/unix/paas/latest?include=java&bitness=64&Api-Token={{ token }}"

etc/m2ee/m2ee.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ m2ee:
2222
javaopts:
2323
[
2424
"-Dfile.encoding=UTF-8",
25-
"-Djava.io.tmpdir=BUILD_PATH/data/tmp",
26-
"-XX:OnError=kill -s USR1 PYTHONPID",
27-
"-XX:OnOutOfMemoryError=kill -s USR2 PYTHONPID",
25+
"-Djava.io.tmpdir=/tmp",
26+
"-XX:OnError=BUILD_PATH/.local/scripts/on_error.sh",
27+
"-XX:OnOutOfMemoryError=BUILD_PATH/.local/scripts/on_out_of_memory_error.sh",
2828
]
2929

3030
jetty:

etc/scripts/on_error.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
kill -s USR1 PYTHONPID
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
kill -s USR2 PYTHONPID

0 commit comments

Comments
 (0)