From 81e2d9700109cc915117ae655fb094245bc85218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Imbern=C3=B3n?= Date: Mon, 13 Jan 2025 14:46:18 +0100 Subject: [PATCH] Add a generic rule for APM->DB relationships (#1848) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new rule allows any hostname as DB endpoint, not limiting it to RDS. It includes a more strict regex which only includes those providers that are supported in the `DATABASE` candidate category. The regex also filters out those unsupported metric names that contain a `;` in the endpoint (legacy format to concat different endpoints in a single metric). Co-authored-by: Otávio Carvalho --- .../synthesis/APM-APPLICATION-to-DATABASE.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/relationships/synthesis/APM-APPLICATION-to-DATABASE.yml b/relationships/synthesis/APM-APPLICATION-to-DATABASE.yml index 3b1d5cae8..d61a15173 100644 --- a/relationships/synthesis/APM-APPLICATION-to-DATABASE.yml +++ b/relationships/synthesis/APM-APPLICATION-to-DATABASE.yml @@ -37,3 +37,22 @@ relationships: fields: - field: endpoint attribute: metricName__4 + - name: apmCallsGenericDatabase + version: "1" + origins: + - APM Metrics + conditions: + - attribute: metricName + regex: "^datastore/instance/(?:mysql|postgres|mssql|oracle|mariadb|jdbc)/[^/;]*/.*" + relationship: + expires: P75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: DATABASE + fields: + - field: endpoint + attribute: metricName__4