Skip to content

Commit

Permalink
Release 2025-02-20 (#855)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
5 people authored Feb 20, 2025
1 parent 361908b commit 21fbe77
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 29 deletions.
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

0 comments on commit 21fbe77

Please sign in to comment.