From cf0444b53403655200687f0b6feec5464cde77fe Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala Date: Thu, 28 Nov 2024 14:31:04 +0530 Subject: [PATCH] fix: Added redshift cluster relation created --- .../candidates/AWSREDSHIFTCLUSTER.yml | 16 +++++++++++++ ...M-APPLICATION-to-INFRA-REDSHIFTCLUSTER.yml | 22 +++++++++++++++++ .../EXT-SERVICE-to-INFRA-REDSHIFTCLUSTER.yml | 24 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 relationships/candidates/AWSREDSHIFTCLUSTER.yml create mode 100644 relationships/synthesis/APM-APPLICATION-to-INFRA-REDSHIFTCLUSTER.yml create mode 100644 relationships/synthesis/EXT-SERVICE-to-INFRA-REDSHIFTCLUSTER.yml diff --git a/relationships/candidates/AWSREDSHIFTCLUSTER.yml b/relationships/candidates/AWSREDSHIFTCLUSTER.yml new file mode 100644 index 000000000..465bb09a2 --- /dev/null +++ b/relationships/candidates/AWSREDSHIFTCLUSTER.yml @@ -0,0 +1,16 @@ +category: AWSREDSHIFTCLUSTER +lookups: + - entityTypes: + - domain: INFRA + type: AWSREDSHIFTCLUSTER + tags: + matchingMode: ALL + predicates: + - tagKeys: ["configuration.endpoint.address"] + field: cloudEndpointAddress + onMatch: + onMultipleMatches: RELATE_ALL + onMiss: + action: CREATE_UNINSTRUMENTED + uninstrumented: + type: AWSREDSHIFTCLUSTER \ No newline at end of file diff --git a/relationships/synthesis/APM-APPLICATION-to-INFRA-REDSHIFTCLUSTER.yml b/relationships/synthesis/APM-APPLICATION-to-INFRA-REDSHIFTCLUSTER.yml new file mode 100644 index 000000000..fa6536e0f --- /dev/null +++ b/relationships/synthesis/APM-APPLICATION-to-INFRA-REDSHIFTCLUSTER.yml @@ -0,0 +1,22 @@ +relationships: + - name: apmApplicationCallsInfraRedshiftCluster + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: configuration.endpoint.address + regex: '^[a-zA-Z0-9\-]+\.c[a-z0-9]+\.([a-zA-Z0-9\-]+)\.redshift\.amazonaws\.com$' + relationship: + expires: P75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSREDSHIFTCLUSTER + fields: + - field: cloudEndpointAddress + attribute: configuration.endpoint.address \ No newline at end of file diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-REDSHIFTCLUSTER.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-REDSHIFTCLUSTER.yml new file mode 100644 index 000000000..6af42cdd1 --- /dev/null +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-REDSHIFTCLUSTER.yml @@ -0,0 +1,24 @@ +relationships: + - name: extServiceCallsInfraRedshiftCluster + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: instrumentation.provider + anyOf: [ "opentelemetry" ] + - attribute: rpc.service + anyOf: [ "Redshift" ] + relationship: + expires: P75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSREDSHIFTCLUSTER + fields: + - field: cloudEndpointAddress + attribute: configuration.endpoint.address \ No newline at end of file