From f01c4a60b91130cbf74c1122064cad3c5e17251b Mon Sep 17 00:00:00 2001 From: Sashwatdas123 Date: Tue, 14 Jul 2026 14:44:08 +0530 Subject: [PATCH 1/3] feat: Add cloud.resource_id and faas.id rules for AWS Lambda relationships --- entity-types/ext-service/definition.yml | 4 ++ .../EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml | 56 ++++++++++++++++++- ...EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml | 56 ++++++++++++++++++- 3 files changed, 114 insertions(+), 2 deletions(-) diff --git a/entity-types/ext-service/definition.yml b/entity-types/ext-service/definition.yml index 8cb7aa4583..8187fd3f9f 100644 --- a/entity-types/ext-service/definition.yml +++ b/entity-types/ext-service/definition.yml @@ -99,9 +99,13 @@ synthesis: telemetry.sdk.language: entityTagName: language telemetry.sdk.version: + ttl: P1D service.namespace: + ttl: P1D faas.name: + ttl: P1D faas.id: + ttl: P1D newrelic.service.type: ttl: P1D diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml index 1cb446530b..81a48deb42 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml @@ -24,4 +24,58 @@ relationships: candidateCategory: AWSLAMBDAALIAS fields: - field: awsLambdaAliasArn - attribute: newrelic.aws_metric_streams.arn \ No newline at end of file + attribute: newrelic.aws_metric_streams.arn + + - name: extServiceCallsAwsLambdaAlias_CloudResourceId + version: "1" + origins: + - Distributed Tracing + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: [ "Log", "Span" ] + - attribute: newrelic.source + anyOf: [ "api.logs.otlp", "api.traces.otlp" ] + - attribute: entity.type + anyOf: [ "SERVICE" ] + - attribute: cloud.resource_id + regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$" + relationship: + expires: PT75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSLAMBDAALIAS + fields: + - field: awsLambdaAliasArn + attribute: cloud.resource_id + + - name: extServiceCallsAwsLambdaAlias_FaasId + version: "1" + origins: + - Distributed Tracing + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: [ "Log", "Span" ] + - attribute: newrelic.source + anyOf: [ "api.logs.otlp", "api.traces.otlp" ] + - attribute: entity.type + anyOf: [ "SERVICE" ] + - attribute: faas.id + regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$" + relationship: + expires: PT75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSLAMBDAALIAS + fields: + - field: awsLambdaAliasArn + attribute: faas.id \ No newline at end of file diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml index aaf25c057e..d67a32fdcf 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml @@ -24,4 +24,58 @@ relationships: candidateCategory: AWSLAMBDAFUNCTION fields: - field: awsLambdaArn - attribute: newrelic.aws_metric_streams.arn \ No newline at end of file + attribute: newrelic.aws_metric_streams.arn + + - name: extServiceCallsAwsLambdaFunction_CloudResourceId + version: "1" + origins: + - Distributed Tracing + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: ["Log", "Span"] + - attribute: newrelic.source + anyOf: [ "api.traces.otlp", "api.logs.otlp" ] + - attribute: entity.type + anyOf: [ "SERVICE" ] + - attribute: cloud.resource_id + regex: "^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$" + relationship: + expires: PT75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSLAMBDAFUNCTION + fields: + - field: awsLambdaArn + attribute: cloud.resource_id + + - name: extServiceCallsAwsLambdaFunction_FaasId + version: "1" + origins: + - Distributed Tracing + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: ["Log", "Span"] + - attribute: newrelic.source + anyOf: [ "api.traces.otlp", "api.logs.otlp" ] + - attribute: entity.type + anyOf: [ "SERVICE" ] + - attribute: faas.id + regex: "^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$" + relationship: + expires: PT75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSLAMBDAFUNCTION + fields: + - field: awsLambdaArn + attribute: faas.id \ No newline at end of file From 6c5017b98c09c2268d3a20113174b2265738b669 Mon Sep 17 00:00:00 2001 From: Sashwatdas123 Date: Tue, 14 Jul 2026 19:51:54 +0530 Subject: [PATCH 2/3] feat: Add aws.lambda.invoked_arn relationships for AWS Lambda integration --- entity-types/ext-service/definition.yml | 2 ++ .../EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml | 29 ++++++++++++++++++- ...EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml | 29 ++++++++++++++++++- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/entity-types/ext-service/definition.yml b/entity-types/ext-service/definition.yml index 8187fd3f9f..39eb509c03 100644 --- a/entity-types/ext-service/definition.yml +++ b/entity-types/ext-service/definition.yml @@ -106,6 +106,8 @@ synthesis: ttl: P1D faas.id: ttl: P1D + aws.lambda.invoked_arn: + ttl: P1D newrelic.service.type: ttl: P1D diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml index 81a48deb42..cb3ae67675 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml @@ -78,4 +78,31 @@ relationships: candidateCategory: AWSLAMBDAALIAS fields: - field: awsLambdaAliasArn - attribute: faas.id \ No newline at end of file + attribute: faas.id + + - name: extServiceCallsAwsLambdaAlias_InvokedArn + version: "1" + origins: + - Distributed Tracing + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: [ "Log", "Span" ] + - attribute: newrelic.source + anyOf: [ "api.logs.otlp", "api.traces.otlp" ] + - attribute: entity.type + anyOf: [ "SERVICE" ] + - attribute: aws.lambda.invoked_arn + regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$" + relationship: + expires: PT75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSLAMBDAALIAS + fields: + - field: awsLambdaAliasArn + attribute: aws.lambda.invoked_arn \ No newline at end of file diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml index d67a32fdcf..d64136d0c9 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml @@ -78,4 +78,31 @@ relationships: candidateCategory: AWSLAMBDAFUNCTION fields: - field: awsLambdaArn - attribute: faas.id \ No newline at end of file + attribute: faas.id + + - name: extServiceCallsAwsLambdaFunction_InvokedArn + version: "1" + origins: + - Distributed Tracing + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: ["Log", "Span"] + - attribute: newrelic.source + anyOf: [ "api.traces.otlp", "api.logs.otlp" ] + - attribute: entity.type + anyOf: [ "SERVICE" ] + - attribute: aws.lambda.invoked_arn + regex: "^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$" + relationship: + expires: PT75M + relationshipType: CALLS + source: + extractGuid: + attribute: entity.guid + target: + lookupGuid: + candidateCategory: AWSLAMBDAFUNCTION + fields: + - field: awsLambdaArn + attribute: aws.lambda.invoked_arn \ No newline at end of file From b632752b83e1f65522999e675a44f80bb9271744 Mon Sep 17 00:00:00 2001 From: Sashwatdas123 Date: Tue, 21 Jul 2026 09:32:06 +0530 Subject: [PATCH 3/3] feat: changes to rules in order to enforce the precedence. --- .../EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml | 34 ++++++++++++------ ...EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml | 36 ++++++++++++------- 2 files changed, 47 insertions(+), 23 deletions(-) diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml index cb3ae67675..01400fb139 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.yml @@ -7,9 +7,9 @@ relationships: conditions: - attribute: eventType anyOf: [ "Log", "Span" ] - - attribute: newrelic.source - anyOf: [ "api.logs.otlp", "api.traces.otlp" ] - - attribute: entity.type + - attribute: newrelic.source + anyOf: [ "api.logs.otlp", "api.traces.otlp" ] + - attribute: entity.type anyOf: [ "SERVICE" ] - attribute: newrelic.aws_metric_streams.arn regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$" @@ -26,7 +26,7 @@ relationships: - field: awsLambdaAliasArn attribute: newrelic.aws_metric_streams.arn - - name: extServiceCallsAwsLambdaAlias_CloudResourceId + - name: extServiceCallsAwsLambdaAlias_InvokedArn version: "1" origins: - Distributed Tracing @@ -38,7 +38,9 @@ relationships: anyOf: [ "api.logs.otlp", "api.traces.otlp" ] - attribute: entity.type anyOf: [ "SERVICE" ] - - attribute: cloud.resource_id + - attribute: newrelic.aws_metric_streams.arn + present: false + - attribute: aws.lambda.invoked_arn regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$" relationship: expires: PT75M @@ -51,9 +53,9 @@ relationships: candidateCategory: AWSLAMBDAALIAS fields: - field: awsLambdaAliasArn - attribute: cloud.resource_id + attribute: aws.lambda.invoked_arn - - name: extServiceCallsAwsLambdaAlias_FaasId + - name: extServiceCallsAwsLambdaAlias_CloudResourceId version: "1" origins: - Distributed Tracing @@ -65,7 +67,11 @@ relationships: anyOf: [ "api.logs.otlp", "api.traces.otlp" ] - attribute: entity.type anyOf: [ "SERVICE" ] - - attribute: faas.id + - attribute: newrelic.aws_metric_streams.arn + present: false + - attribute: aws.lambda.invoked_arn + present: false + - attribute: cloud.resource_id regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$" relationship: expires: PT75M @@ -78,9 +84,9 @@ relationships: candidateCategory: AWSLAMBDAALIAS fields: - field: awsLambdaAliasArn - attribute: faas.id + attribute: cloud.resource_id - - name: extServiceCallsAwsLambdaAlias_InvokedArn + - name: extServiceCallsAwsLambdaAlias_FaasId version: "1" origins: - Distributed Tracing @@ -92,7 +98,13 @@ relationships: anyOf: [ "api.logs.otlp", "api.traces.otlp" ] - attribute: entity.type anyOf: [ "SERVICE" ] + - attribute: newrelic.aws_metric_streams.arn + present: false - attribute: aws.lambda.invoked_arn + present: false + - attribute: cloud.resource_id + present: false + - attribute: faas.id regex: "^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$" relationship: expires: PT75M @@ -105,4 +117,4 @@ relationships: candidateCategory: AWSLAMBDAALIAS fields: - field: awsLambdaAliasArn - attribute: aws.lambda.invoked_arn \ No newline at end of file + attribute: faas.id diff --git a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml index d64136d0c9..8ab1da00a1 100644 --- a/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml +++ b/relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.yml @@ -7,10 +7,10 @@ relationships: conditions: - attribute: eventType anyOf: ["Log", "Span"] - - attribute: newrelic.source - anyOf: [ "api.traces.otlp", "api.logs.otlp" ] - - attribute: entity.type - anyOf: [ "SERVICE" ] + - attribute: newrelic.source + anyOf: [ "api.traces.otlp", "api.logs.otlp" ] + - attribute: entity.type + anyOf: [ "SERVICE" ] - attribute: newrelic.aws_metric_streams.arn regex: "^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$" relationship: @@ -26,7 +26,7 @@ relationships: - field: awsLambdaArn attribute: newrelic.aws_metric_streams.arn - - name: extServiceCallsAwsLambdaFunction_CloudResourceId + - name: extServiceCallsAwsLambdaFunction_InvokedArn version: "1" origins: - Distributed Tracing @@ -38,7 +38,9 @@ relationships: anyOf: [ "api.traces.otlp", "api.logs.otlp" ] - attribute: entity.type anyOf: [ "SERVICE" ] - - attribute: cloud.resource_id + - attribute: newrelic.aws_metric_streams.arn + present: false + - attribute: aws.lambda.invoked_arn regex: "^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$" relationship: expires: PT75M @@ -51,9 +53,9 @@ relationships: candidateCategory: AWSLAMBDAFUNCTION fields: - field: awsLambdaArn - attribute: cloud.resource_id + attribute: aws.lambda.invoked_arn - - name: extServiceCallsAwsLambdaFunction_FaasId + - name: extServiceCallsAwsLambdaFunction_CloudResourceId version: "1" origins: - Distributed Tracing @@ -65,7 +67,11 @@ relationships: anyOf: [ "api.traces.otlp", "api.logs.otlp" ] - attribute: entity.type anyOf: [ "SERVICE" ] - - attribute: faas.id + - attribute: newrelic.aws_metric_streams.arn + present: false + - attribute: aws.lambda.invoked_arn + present: false + - attribute: cloud.resource_id regex: "^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$" relationship: expires: PT75M @@ -78,9 +84,9 @@ relationships: candidateCategory: AWSLAMBDAFUNCTION fields: - field: awsLambdaArn - attribute: faas.id + attribute: cloud.resource_id - - name: extServiceCallsAwsLambdaFunction_InvokedArn + - name: extServiceCallsAwsLambdaFunction_FaasId version: "1" origins: - Distributed Tracing @@ -92,7 +98,13 @@ relationships: anyOf: [ "api.traces.otlp", "api.logs.otlp" ] - attribute: entity.type anyOf: [ "SERVICE" ] + - attribute: newrelic.aws_metric_streams.arn + present: false - attribute: aws.lambda.invoked_arn + present: false + - attribute: cloud.resource_id + present: false + - attribute: faas.id regex: "^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$" relationship: expires: PT75M @@ -105,4 +117,4 @@ relationships: candidateCategory: AWSLAMBDAFUNCTION fields: - field: awsLambdaArn - attribute: aws.lambda.invoked_arn \ No newline at end of file + attribute: faas.id