Skip to content

Commit

Permalink
NR-301930: Create a placeholder when entity is not found (#1726)
Browse files Browse the repository at this point in the history
* Create Relationship with APM and Lambda Function and Lambda Function Alias

* remove lambda function alias from synthesis definition file

* Updated the regex

* Addressed linter issue

* Addressed linter issue

* Addressed linter issue

* Addressed review comments

---------

Co-authored-by: sravyaparsi <[email protected]>
Co-authored-by: nr-sparsi <[email protected]>
Co-authored-by: Otávio Carvalho <[email protected]>
  • Loading branch information
4 people authored Aug 13, 2024
1 parent 7f553b1 commit 778e0ed
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 40 deletions.
16 changes: 16 additions & 0 deletions relationships/candidates/AWSLAMBDAALIAS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
category: AWSLAMBDAALIAS
lookups:
- entityTypes:
- domain: INFRA
type: AWSLAMBDAFUNCTIONALIAS
tags:
matchingMode: ALL
predicates:
- tagKeys: [ "aws.Arn" ]
field: awsLambdaAliasArn
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: CREATE_UNINSTRUMENTED
uninstrumented:
type: AWSLAMBDAALIAS
8 changes: 4 additions & 4 deletions relationships/candidates/AWSLAMBDAFUNCTION.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ lookups:
- entityTypes:
- domain: INFRA
type: AWSLAMBDAFUNCTION
- domain: INFRA
type: AWSLAMBDAFUNCTIONALIAS
tags:
matchingMode: ALL
predicates:
- tagKeys: ["aws.arn","aws.functionArn","aws.lambda.functionArn","aws.Arn"]
- tagKeys: ["aws.functionArn","aws.lambda.functionArn"]
field: awsLambdaArn
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: NO_OP
action: CREATE_UNINSTRUMENTED
uninstrumented:
type: AWSLAMBDAFUNCTION
24 changes: 24 additions & 0 deletions relationships/synthesis/APM-APPLICATION-to-INFRA-LAMBDAALIAS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
relationships:
- name: apmCallsLambdaAlias
version: "1"
origins:
- Distributed Tracing
conditions:
- attribute: eventType
anyOf: [ "Span" ]
- attribute: cloud.platform
anyOf: [ "aws_lambda"]
- attribute: cloud.resource_id
regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$"
relationship:
expires: P75M
relationshipType: CALLS
source:
extractGuid:
attribute: entity.guid
target:
lookupGuid:
candidateCategory: AWSLAMBDAALIAS
fields:
- field: awsLambdaAliasArn
attribute: cloud.resource_id
42 changes: 6 additions & 36 deletions validator/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 778e0ed

Please sign in to comment.