From 3714cfea37c2ae1a1dbcce840a8054b3e624f209 Mon Sep 17 00:00:00 2001 From: vinay konatala Date: Mon, 9 Dec 2024 15:03:01 +0530 Subject: [PATCH] feat: Enhance Entity Relationships - for APM and OTel to APPSYNC API (#1788) * feat: Added kiness delivery stream * feat: Added relationship condition * fix: Added apm kinesis relation file * fix:Removed apm relation file * fix: Add new condition * fix: Added quotes in array * feat: Added appsync api relationship files * fix: Removed other relationship files * fix: Updated the regex * fix: Updated relationship name * fix: Updated attribute names --------- Co-authored-by: nr-cmorenoin --- relationships/candidates/AWSAPPSYNCAPI.yml | 16 +++++++++++++ ...APM-APPLICATION-to-INFRA-AWSAPPSYNCAPI.yml | 22 +++++++++++++++++ .../EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml | 24 +++++++++++++++++++ 3 files changed, 62 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..4f4b780fe --- /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-z]+\d*[a-z]*\.appsync-api\.[a-z]{2}-[a-z]+-\d+\.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..6b11d8418 --- /dev/null +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSAPPSYNCAPI.yml @@ -0,0 +1,24 @@ +relationships: + - name: extServiceCallsInfraAppSyncApi + version: "1" + origins: + - Distributed Tracing + conditions: + - attribute: eventType + anyOf: [ "Span" ] + - attribute: instrumentation.provider + anyOf: [ "opentelemetry" ] + - 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 + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSAPPSYNCAPI + fields: + - field: httpUrl + attribute: Http.Url \ No newline at end of file