Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
66a3741
Bump ruff from 0.7.4 to 0.8.0
dependabot[bot] Nov 25, 2024
54e5b64
Merge pull request #824 from mendix/dependabot/pip/develop/ruff-0.8.0
jeohist Nov 27, 2024
48af06d
Bump cryptography from 43.0.3 to 44.0.0
dependabot[bot] Dec 2, 2024
ac6f961
Merge pull request #825 from mendix/dependabot/pip/develop/cryptograp…
jeohist Dec 16, 2024
bb9d0fd
Bump pytest from 8.3.3 to 8.3.4
dependabot[bot] Dec 16, 2024
1f879ce
Merge pull request #828 from mendix/dependabot/pip/develop/pytest-8.3.4
jeohist Dec 16, 2024
a1f154c
Bump certifi from 2024.8.30 to 2024.12.14
dependabot[bot] Dec 16, 2024
80abf40
Merge pull request #830 from mendix/dependabot/pip/develop/certifi-20…
jeohist Dec 16, 2024
40c76af
Bump ruff from 0.8.0 to 0.8.3
dependabot[bot] Dec 16, 2024
8ea26e2
Merge pull request #831 from mendix/dependabot/pip/develop/ruff-0.8.3
jeohist Dec 16, 2024
e1659da
Bump pylint from 3.3.1 to 3.3.2
dependabot[bot] Dec 16, 2024
9094a17
Merge pull request #827 from mendix/dependabot/pip/develop/pylint-3.3.2
jeohist Dec 16, 2024
94ef5d7
Bump jinja2 from 3.1.4 to 3.1.5
dependabot[bot] Dec 23, 2024
c80ffdc
Merge pull request #833 from mendix/dependabot/pip/develop/jinja2-3.1.5
jeohist Dec 24, 2024
b6e7579
Bump urllib3 from 2.2.3 to 2.3.0
dependabot[bot] Dec 24, 2024
2feb5d4
Merge pull request #834 from mendix/dependabot/pip/develop/urllib3-2.3.0
jeohist Dec 24, 2024
806e8be
Bump click from 8.1.7 to 8.1.8
dependabot[bot] Dec 24, 2024
f2cc586
Merge pull request #832 from mendix/dependabot/pip/develop/click-8.1.8
jeohist Dec 24, 2024
83232bd
Bump ruff from 0.8.3 to 0.8.4
dependabot[bot] Dec 24, 2024
eedb20c
Merge pull request #835 from mendix/dependabot/pip/develop/ruff-0.8.4
jeohist Dec 24, 2024
877622a
Bump pylint from 3.3.2 to 3.3.3
dependabot[bot] Dec 30, 2024
053bba3
Merge pull request #836 from mendix/dependabot/pip/develop/pylint-3.3.3
jeohist Jan 3, 2025
4b617d1
Upgrade appdynamics java and machine agents to version 14.12.0
ekremsekerci Jan 21, 2025
769298c
feat: rollback to master
mukund-padale Jan 27, 2025
0199410
Merge pull request #841 from mendix/develop-rollback-master
sailhenz Jan 27, 2025
9394bb7
Merge branch 'develop' into LM-2300_apm_up_appd
mukund-padale Jan 27, 2025
fed859e
Merge pull request #840 from mendix/LM-2300_apm_up_appd
sailhenz Jan 27, 2025
2307311
Merge pull request #850 from mendix/master
sailhenz Jan 31, 2025
04b221e
Upgrade datadog agents to the latest versions (#849)
ekremsekerci Feb 18, 2025
23e7b56
Rename custom jmx metrics (#854)
ekremsekerci Feb 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions buildpack/core/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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(
Expand Down
40 changes: 18 additions & 22 deletions buildpack/telemetry/datadog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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"},
},
}
},
Expand All @@ -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"},
},
}
},
Expand All @@ -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"},
},
}
},
{
Expand All @@ -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': {
# }
# },
}
],
}
Expand Down
4 changes: 2 additions & 2 deletions dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
6 changes: 3 additions & 3 deletions etc/m2ee/m2ee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions etc/scripts/on_error.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
kill -s USR1 PYTHONPID
2 changes: 2 additions & 0 deletions etc/scripts/on_out_of_memory_error.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
kill -s USR2 PYTHONPID
Loading