Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions entity-types/infra-oracledbinstance/definition.stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ synthesis:
entityTagName: host.address
host.port:
entityTagName: host.port
service.name:
entityTagName: service.name
db.hostname:
entityTagName: db.hostname


goldenTags: []
Expand Down
11 changes: 5 additions & 6 deletions relationships/candidates/ORACLEDBINSTANCE.stg.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
category: ORACLEDBINSTANCE
lookups:
# Primary lookup: Match by service.name and host.port (for OTEL Oracle instances with service name)
- entityTypes:
- domain: INFRA
type: ORACLEDBINSTANCE
tags:
matchingMode: ALL
predicates:
- tagKeys: ["service.name"]
field: serviceName
- tagKeys: ["host.address"]
field: hostAddress
- tagKeys: ["host.port"]
field: hostPort
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: NO_OP
# Secondary lookup: Match by host.address and host.port (for OTEL Oracle instances without service name)

- entityTypes:
- domain: INFRA
type: ORACLEDBINSTANCE
tags:
matchingMode: ALL
predicates:
- tagKeys: ["host.address"]
field: hostAddress
- tagKeys: ["db.hostname"]
field: dbHostname
- tagKeys: ["host.port"]
field: hostPort
onMatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
relationships:
# Primary relationship: Match by service.name and host.port
- name: apmApplicationCallsInfraOracleDbInstance
- name: apmApplicationCallsInfraOracleDbInstanceTimeslice
version: "1"
origins:
- APM Metrics
conditions:
- attribute: metricName
# APM reports: "datastore/instance/Oracle/$service_name/$port"
# Example: "Datastore/instance/Oracle/orcl-db.privatesubnet.oracledb.oraclevcn.com/1521"
# The service name in APM metric should match the OTEL Oracle entity's service.name tag
startsWith: "datastore/instance/Oracle/"
startsWith: "Datastore/instance/Oracle/"
relationship:
expires: PT75M
relationshipType: CALLS
Expand All @@ -20,23 +16,18 @@ relationships:
lookupGuid:
candidateCategory: ORACLEDBINSTANCE
fields:
# Matches against the OTEL Oracle entity's service.name tag
# This is the Oracle service name from the connection string
- field: serviceName
attribute: metricName__4 # service name from APM metric
- field: dbHostname
attribute: metricName__4
- field: hostPort
attribute: metricName__5 # port from APM metric
attribute: metricName__5

# Fallback relationship: Match by host and port when service name doesn't match
- name: apmApplicationCallsInfraOracleDbInstanceByHost
version: "1"
origins:
- APM Metrics
conditions:
- attribute: metricName
# APM reports: "datastore/instance/Oracle/$host/$port"
# This is a fallback when service.name doesn't match but host does
startsWith: "datastore/instance/Oracle/"
regex: "^[Dd]atastore/instance/Oracle/[^/]+/[0-9]+"
relationship:
expires: PT75M
relationshipType: CALLS
Expand All @@ -47,8 +38,7 @@ relationships:
lookupGuid:
candidateCategory: ORACLEDBINSTANCE
fields:
# Matches against the OTEL Oracle entity's host.address tag
- field: hostAddress
attribute: metricName__4 # host from APM metric
attribute: metricName__4
- field: hostPort
attribute: metricName__5 # port from APM metric
attribute: metricName__5