Skip to content

Commit

Permalink
Add a generic rule for APM->DB relationships (newrelic#1848)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
2 people authored and rohit-bandlamudi-nr committed Jan 15, 2025
1 parent 08cdcbb commit 81e2d97
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions relationships/synthesis/APM-APPLICATION-to-DATABASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 81e2d97

Please sign in to comment.