From 91a69df9c8f63bb0afc2510792631f8ed57c332e Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Fri, 25 Oct 2024 14:27:42 +0530 Subject: [PATCH 01/11] feat: Added kiness delivery stream --- .../candidates/AWSKINESISDELIVERYSTREAM.yml | 16 ++++++++++++++++ ...XT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 relationships/candidates/AWSKINESISDELIVERYSTREAM.yml create mode 100644 relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml diff --git a/relationships/candidates/AWSKINESISDELIVERYSTREAM.yml b/relationships/candidates/AWSKINESISDELIVERYSTREAM.yml new file mode 100644 index 000000000..0eb76f705 --- /dev/null +++ b/relationships/candidates/AWSKINESISDELIVERYSTREAM.yml @@ -0,0 +1,16 @@ +category: AWSKINESISDELIVERYSTREAM +lookups: + - entityTypes: + - domain: INFRA + type: AWSKINESISDELIVERYSTREAM + tags: + matchingMode: ALL + predicates: + - tagKeys: ["aws.arn"] + field: cloudResourceId + onMatch: + onMultipleMatches: RELATE_ALL + onMiss: + action: CREATE_UNINSTRUMENTED + uninstrumented: + type: AWSKINESISDELIVERYSTREAM \ No newline at end of file diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml new file mode 100644 index 000000000..8bcab8c47 --- /dev/null +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml @@ -0,0 +1,10 @@ +relationships: + - name: extServiceCallsInfraKinesisDeliveryStream + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: rpc.service + anyOf: [ "kinesis" ] \ No newline at end of file From ca29b24bdf88db6e279b6fb881e9f19651087fdb Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 29 Oct 2024 11:50:46 +0530 Subject: [PATCH 02/11] feat: Added relationship condition --- ...SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml new file mode 100644 index 000000000..112fefb55 --- /dev/null +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml @@ -0,0 +1,22 @@ +relationships: + - name: extServiceCallsInfraKinesisDeliveryStream + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: rpc.service + anyOf: [ "kinesis", Firehose ] + relationship: + expires: P75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSKINESISDELIVERYSTREAM + fields: + - field: cloudResourceId + attribute: cloud.resource_id \ No newline at end of file From 233e9a5d3964f133b0d795334bc47e7e44972a9c Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 29 Oct 2024 14:47:51 +0530 Subject: [PATCH 03/11] fix: Added apm kinesis relation file --- .../APM-APPLICATION-to-INFRA-KINESIS.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml diff --git a/relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml b/relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml new file mode 100644 index 000000000..2f8da1490 --- /dev/null +++ b/relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml @@ -0,0 +1,24 @@ +relationships: + - name: AWSKINESISSTREAM + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: cloud.platform + anyOf: [ "aws_kinesis_data_streams"] + - attribute: cloud.resource_id + regex: "^arn:aws:kinesis:([^:]*):([^:]*):stream:([^:]*)" + relationship: + expires: P75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSKINESISSTREAM + fields: + - field: cloudResourceId + attribute: cloud.resource_id \ No newline at end of file From bce08df30bc6f344fae4dcb1ae490779da564e1b Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 29 Oct 2024 14:56:07 +0530 Subject: [PATCH 04/11] fix:Removed apm relation file --- .../APM-APPLICATION-to-INFRA-KINESIS.yml | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml diff --git a/relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml b/relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml deleted file mode 100644 index 2f8da1490..000000000 --- a/relationships/synthesis/APM-APPLICATION-to-INFRA-KINESIS.yml +++ /dev/null @@ -1,24 +0,0 @@ -relationships: - - name: AWSKINESISSTREAM - version: "1" - origins: - - Distributed Tracing - conditions: - - attribute: eventType - anyOf: [ "Span" ] - - attribute: cloud.platform - anyOf: [ "aws_kinesis_data_streams"] - - attribute: cloud.resource_id - regex: "^arn:aws:kinesis:([^:]*):([^:]*):stream:([^:]*)" - relationship: - expires: P75M - relationshipType: CALLS - source: - extractGuid: - attribute: entity.guid - target: - lookupGuid: - candidateCategory: AWSKINESISSTREAM - fields: - - field: cloudResourceId - attribute: cloud.resource_id \ No newline at end of file From d2dd934747e21a924ccede9d81ea1327240b9656 Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 12 Nov 2024 14:28:43 +0530 Subject: [PATCH 05/11] fix: Add new condition --- .../synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml index 112fefb55..318aa85d4 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml @@ -6,8 +6,11 @@ relationships: conditions: - attribute: eventType anyOf: [ "Span" ] + - attribute: instrumentation.provider + anyOf: [ "opentelemetry" ] - attribute: rpc.service - anyOf: [ "kinesis", Firehose ] + anyOf: [ Firehose ] + relationship: expires: P75M relationshipType: CALLS From 122b600fe95bf73b6f0a6a25dc1c7382fcc9cf09 Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Wed, 13 Nov 2024 15:08:23 +0530 Subject: [PATCH 06/11] fix: Added quotes in array --- .../synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml index 318aa85d4..1e0b9f8af 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml @@ -9,7 +9,7 @@ relationships: - attribute: instrumentation.provider anyOf: [ "opentelemetry" ] - attribute: rpc.service - anyOf: [ Firehose ] + anyOf: [ "Firehose" ] relationship: expires: P75M From f5134c04ca29d365c2282e13708eaef72e94c961 Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 19 Nov 2024 04:21:54 +0530 Subject: [PATCH 07/11] feat: Added appsync api relationship files --- relationships/candidates/AWSAPPSYNCAPI.yml | 16 ++++++++++++ ...APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml | 22 ++++++++++++++++ .../EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml | 25 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 relationships/candidates/AWSAPPSYNCAPI.yml create mode 100644 relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml create mode 100644 relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml diff --git a/relationships/candidates/AWSAPPSYNCAPI.yml b/relationships/candidates/AWSAPPSYNCAPI.yml new file mode 100644 index 000000000..9d4d030e0 --- /dev/null +++ b/relationships/candidates/AWSAPPSYNCAPI.yml @@ -0,0 +1,16 @@ +category: AWSAPPSYNCAPI +lookups: + - entityTypes: + - domain: INFRA + type: AWSAPPSYNCAPI + tags: + matchingMode: ALL + predicates: + - tagKeys: ["Http.Url"] + field: httpUrl + onMatch: + onMultipleMatches: RELATE_ALL + onMiss: + action: CREATE_UNINSTRUMENTED + uninstrumented: + type: AWSAPPSYNCAPI \ No newline at end of file diff --git a/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml b/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml new file mode 100644 index 000000000..e4e732702 --- /dev/null +++ b/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml @@ -0,0 +1,22 @@ +relationships: + - name: apmCallsInfraAppSyncApi + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: Peer.Hostname + regex: "[a-z0-9]{25}\.appsync-api\.us-east-2\.amazonaws\.com" + relationship: + expires: P75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSAPPSYNCAPI + fields: + - field: httpUrl + attribute: Http.Url \ No newline at end of file diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml new file mode 100644 index 000000000..613795b6c --- /dev/null +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml @@ -0,0 +1,25 @@ +relationships: + - name: extServiceCallsInfraKinesisDeliveryStream + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: instrumentation.provider + anyOf: [ "opentelemetry" ] + - attribute: Net.peer.name + regex: "[a-z0-9]{25}\.appsync-api\.us-east-2\.amazonaws\.com" + + relationship: + expires: P75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSAPPSYNCAPI + fields: + - field: httpUrl + attribute: Http.Url \ No newline at end of file From 4e1c14778bddc09b134b6342bc743a18c458bf2b Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 19 Nov 2024 04:28:05 +0530 Subject: [PATCH 08/11] fix: Removed other relationship files --- .../candidates/AWSKINESISDELIVERYSTREAM.yml | 16 ------------ ...SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml | 25 ------------------- 2 files changed, 41 deletions(-) delete mode 100644 relationships/candidates/AWSKINESISDELIVERYSTREAM.yml delete mode 100644 relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml diff --git a/relationships/candidates/AWSKINESISDELIVERYSTREAM.yml b/relationships/candidates/AWSKINESISDELIVERYSTREAM.yml deleted file mode 100644 index 0eb76f705..000000000 --- a/relationships/candidates/AWSKINESISDELIVERYSTREAM.yml +++ /dev/null @@ -1,16 +0,0 @@ -category: AWSKINESISDELIVERYSTREAM -lookups: - - entityTypes: - - domain: INFRA - type: AWSKINESISDELIVERYSTREAM - tags: - matchingMode: ALL - predicates: - - tagKeys: ["aws.arn"] - field: cloudResourceId - onMatch: - onMultipleMatches: RELATE_ALL - onMiss: - action: CREATE_UNINSTRUMENTED - uninstrumented: - type: AWSKINESISDELIVERYSTREAM \ No newline at end of file diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml deleted file mode 100644 index 1e0b9f8af..000000000 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-KINESISDELIVERYSTREAM.yml +++ /dev/null @@ -1,25 +0,0 @@ -relationships: - - name: extServiceCallsInfraKinesisDeliveryStream - version: "1" - origins: - - Distributed Tracing - conditions: - - attribute: eventType - anyOf: [ "Span" ] - - attribute: instrumentation.provider - anyOf: [ "opentelemetry" ] - - attribute: rpc.service - anyOf: [ "Firehose" ] - - relationship: - expires: P75M - relationshipType: CALLS - source: - extractGuid: - attribute: entity.guid - target: - lookupGuid: - candidateCategory: AWSKINESISDELIVERYSTREAM - fields: - - field: cloudResourceId - attribute: cloud.resource_id \ No newline at end of file From 781cd7906effef0cca6569a29af1685a0ef056f3 Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 19 Nov 2024 12:26:02 +0530 Subject: [PATCH 09/11] fix: Updated the regex --- .../synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml | 2 +- .../synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml b/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml index e4e732702..7a2bb7dfe 100644 --- a/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml +++ b/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml @@ -7,7 +7,7 @@ relationships: - attribute: eventType anyOf: [ "Span" ] - attribute: Peer.Hostname - regex: "[a-z0-9]{25}\.appsync-api\.us-east-2\.amazonaws\.com" + regex: '[a-z]+\d*[a-z]*\.appsync-api\.[a-z]{2}-[a-z]+-\d+\.amazonaws\.com' relationship: expires: P75M relationshipType: CALLS diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml index 613795b6c..afec670f2 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml @@ -8,9 +8,8 @@ relationships: anyOf: [ "Span" ] - attribute: instrumentation.provider anyOf: [ "opentelemetry" ] - - attribute: Net.peer.name - regex: "[a-z0-9]{25}\.appsync-api\.us-east-2\.amazonaws\.com" - + - attribute: Net.peer.name + regex: '[a-z]+\d*[a-z]*\.appsync-api\.[a-z]{2}-[a-z]+-\d+\.amazonaws\.com' relationship: expires: P75M relationshipType: CALLS From a716098a4b06bef08ca428e6ce8f3a9da4eff714 Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 19 Nov 2024 12:28:21 +0530 Subject: [PATCH 10/11] fix: Updated relationship name --- relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml index afec670f2..176fef353 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml @@ -1,5 +1,5 @@ relationships: - - name: extServiceCallsInfraKinesisDeliveryStream + - name: extServiceCallsInfraAppSyncApi version: "1" origins: - Distributed Tracing From 8f3bc77b05590971d96481f533fffb304ed864c4 Mon Sep 17 00:00:00 2001 From: Vinay Kumar Konatala <vkonatala@newrelic.com> Date: Tue, 26 Nov 2024 17:37:05 +0530 Subject: [PATCH 11/11] fix: Updated attribute names --- .../synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml | 2 +- relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml b/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml index 7a2bb7dfe..4f4b780fe 100644 --- a/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml +++ b/relationships/synthesis/APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml @@ -6,7 +6,7 @@ relationships: conditions: - attribute: eventType anyOf: [ "Span" ] - - attribute: Peer.Hostname + - attribute: peer.hostname regex: '[a-z]+\d*[a-z]*\.appsync-api\.[a-z]{2}-[a-z]+-\d+\.amazonaws\.com' relationship: expires: P75M diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml index 176fef353..6b11d8418 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml @@ -8,7 +8,7 @@ relationships: anyOf: [ "Span" ] - attribute: instrumentation.provider anyOf: [ "opentelemetry" ] - - attribute: Net.peer.name + - attribute: net.peer.name regex: '[a-z]+\d*[a-z]*\.appsync-api\.[a-z]{2}-[a-z]+-\d+\.amazonaws\.com' relationship: expires: P75M