Skip to content

Commit

Permalink
Add manual instrumentation support (#1931)
Browse files Browse the repository at this point in the history
* fix: Add manual instrumentation support

* fix: Update candidate file extension

* fix: arn should be false in non explicit cases

---------

Co-authored-by: Otávio Carvalho <[email protected]>
  • Loading branch information
Sanjalee-NewRelic and otaviocarvalho authored Feb 21, 2025
1 parent 4334423 commit 90add05
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
16 changes: 16 additions & 0 deletions relationships/candidates/AWSMQBROKER_EXPLICIT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
category: AWSMQBROKER_EXPLICIT
lookups:
- entityTypes:
- domain: INFRA
type: AWSMQBROKER
tags:
matchingMode: ALL
predicates:
- tagKeys: ["aws.Arn"]
field: cloudResourceId
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: CREATE_UNINSTRUMENTED
uninstrumented:
type: MQBROKER
36 changes: 36 additions & 0 deletions relationships/synthesis/EXT-SERVICE-to-INFRA-AWSMQBROKER.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ relationships:
- attribute: net.peer.name
present: true
regex: "^[^\\.]+\\.mq\\.[^\\.]+\\.amazonaws\\.com"
- attribute: newrelic.aws_metric_streams.arn
present: false
relationship:
expires: P75M
relationshipType: CONSUMES
Expand Down Expand Up @@ -50,6 +52,8 @@ relationships:
- attribute: net.peer.name
present: true
regex: "^[^\\.]+\\.mq\\.[^\\.]+\\.amazonaws\\.com"
- attribute: newrelic.aws_metric_streams.arn
present: false
relationship:
expires: P75M
relationshipType: PRODUCES
Expand Down Expand Up @@ -82,6 +86,8 @@ relationships:
- attribute: server.address
present: true
regex: "^[^\\.]+\\.mq\\.[^\\.]+\\.amazonaws\\.com"
- attribute: newrelic.aws_metric_streams.arn
present: false
relationship:
expires: P75M
relationshipType: CONSUMES
Expand Down Expand Up @@ -114,6 +120,8 @@ relationships:
- attribute: server.address
present: true
regex: "^[^\\.]+\\.mq\\.[^\\.]+\\.amazonaws\\.com"
- attribute: newrelic.aws_metric_streams.arn
present: false
relationship:
expires: P75M
relationshipType: PRODUCES
Expand All @@ -126,3 +134,31 @@ relationships:
fields:
- field: endpoint
attribute: server.address

- name: extServiceCallsAwsMqBroker_Explicit
version: "1"
origins:
- Distributed Tracing
- OpenTelemetry
conditions:
- attribute: eventType
anyOf: [ "Span", "Log" ]
- attribute: newrelic.source
anyOf: [ "api.traces.otlp", "api.logs.otlp" ]
- attribute: entity.type
anyOf: [ "SERVICE" ]
- attribute: newrelic.aws_metric_streams.arn
regex: "^arn:aws:mq:([^:]*):([^:]*):broker/([^:]*)"
present: true
relationship:
expires: P75M
relationshipType: CALLS
source:
extractGuid:
attribute: entity.guid
target:
lookupGuid:
candidateCategory: AWSMQBROKER_EXPLICIT
fields:
- field: cloudResourceId
attribute: newrelic.aws_metric_streams.arn

0 comments on commit 90add05

Please sign in to comment.