diff --git a/neo4j/CHANGELOG.md b/neo4j/CHANGELOG.md index 5abc2f8b0c..cfab70abb0 100644 --- a/neo4j/CHANGELOG.md +++ b/neo4j/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG - neo4j +## 3.0.3 / 2024-04-05 + +***Fixed***: + +* Fixes db_name tagging regression introduced by 00830c1 - PR [2314](https://github.com/DataDog/integrations-extras/pull/2314) + ## 3.0.2 / 2023-10-31 ***Changed***: diff --git a/neo4j/datadog_checks/neo4j/__about__.py b/neo4j/datadog_checks/neo4j/__about__.py index da4039bce3..8d1c8625fc 100644 --- a/neo4j/datadog_checks/neo4j/__about__.py +++ b/neo4j/datadog_checks/neo4j/__about__.py @@ -1 +1 @@ -__version__ = '3.0.2' +__version__ = "3.0.3" diff --git a/neo4j/datadog_checks/neo4j/neo4j.py b/neo4j/datadog_checks/neo4j/neo4j.py index 55304db40e..d8b54e747e 100644 --- a/neo4j/datadog_checks/neo4j/neo4j.py +++ b/neo4j/datadog_checks/neo4j/neo4j.py @@ -1,3 +1,5 @@ +from packaging import version + from datadog_checks.base import OpenMetricsBaseCheckV2 from datadog_checks.base.checks.openmetrics.v2.transform import NATIVE_TRANSFORMERS @@ -44,7 +46,7 @@ def custom_transformer(metric, sample_data, runtime_data): else: db_name = GLOBAL_DB_NAME final_metric_name = metric_name - if self.config.neo4j_dbs and self.config.neo4j_version.startswith('5.'): + if self.config.neo4j_dbs and version.parse(self.config.neo4j_version) >= version.parse("4.3"): if metric.name.startswith('neo4j_'): raw_metric_name = metric.name.replace('neo4j_', '', 1) else: diff --git a/neo4j/hatch.toml b/neo4j/hatch.toml index 482cb2339f..3e06f0ced3 100644 --- a/neo4j/hatch.toml +++ b/neo4j/hatch.toml @@ -6,8 +6,8 @@ version = ["4.4","5.x"] [envs.default.overrides] matrix.version.env-vars = [ - { key = "NEO4J_IMAGE", value = "neo4j:4.4.18-enterprise", if = ["4.4"] }, - { key = "NEO4J_IMAGE", value = "neo4j:enterprise", if = ["5.x"] }, + { key = "NEO4J_IMAGE", value = "4.4", if = ["4.4"] }, + { key = "NEO4J_IMAGE", value = "5.17", if = ["5.x"] }, ] [envs.default] diff --git a/neo4j/tests/docker/docker-compose_v4.yaml b/neo4j/tests/docker/docker-compose_v4.yaml deleted file mode 100644 index 33c047e4ed..0000000000 --- a/neo4j/tests/docker/docker-compose_v4.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3' - -services: - neo4j: - image: ${NEO4J_IMAGE} - ports: - - 2004:2004 - environment: - - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes - - NEO4J_metrics_prometheus_enabled=true - - NEO4J_metrics_prometheus_endpoint=0.0.0.0:2004 - volumes: - - $HOME/neo4j_v4/conf:/conf - - $HOME/neo4j_v4/data:/data - - $HOME/neo4j_v4/logs:/logs - - $HOME/neo4j_v4/metrics:/metrics diff --git a/neo4j/tests/docker/docker-compose_v5.yaml b/neo4j/tests/docker/docker-compose_v5.yaml deleted file mode 100644 index 949df10e31..0000000000 --- a/neo4j/tests/docker/docker-compose_v5.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3' - -services: - neo4j: - image: ${NEO4J_IMAGE} - ports: - - 2004:2004 - environment: - - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes - - NEO4J_metrics_prometheus_enabled=true - - NEO4J_metrics_prometheus_endpoint=0.0.0.0:2004 - volumes: - - $HOME/neo4j_v5/conf:/conf - - $HOME/neo4j_v5/data:/data - - $HOME/neo4j_v5/logs:/logs - - $HOME/neo4j_v5/metrics:/metrics diff --git a/neo4j/tests/docker/neo4j4/docker-compose.yaml b/neo4j/tests/docker/neo4j4/docker-compose.yaml index 2c50dfe8bc..8f327f5955 100644 --- a/neo4j/tests/docker/neo4j4/docker-compose.yaml +++ b/neo4j/tests/docker/neo4j4/docker-compose.yaml @@ -2,7 +2,7 @@ version: '3' services: neo4j: - image: neo4j:4.4.18-enterprise + image: neo4j:4.4-enterprise ports: - 2004:2004 environment: diff --git a/neo4j/tests/docker/neo4j5/docker-compose.yaml b/neo4j/tests/docker/neo4j5/docker-compose.yaml index fc991bc70d..33bccf3503 100644 --- a/neo4j/tests/docker/neo4j5/docker-compose.yaml +++ b/neo4j/tests/docker/neo4j5/docker-compose.yaml @@ -2,7 +2,7 @@ version: '3' services: neo4j: - image: neo4j:enterprise + image: neo4j:5.17-enterprise ports: - 2004:2004 environment: