Repository: open-telemetry/opentelemetry-collector-contrib (2025-08-21T14:47:53Z)

Issue:
Add query-level metrics along with query text and query execution plan
### Component(s)

receiver/oracledb

### Is your feature request related to a problem? Please describe.

Currently, this receiver produces only instance level metrics, there are no query-level metrics for users to identify slow, resource-intensive database queries. Identifying such queries helps debug the application or database performance issues. If a user wants to investigate the slow query issue, instance-level metrics are not gonna help a lot, as it does not show how a certain query is processed by the server. In this case, query-level metrics for a query that runs slowly could bring more context and greatly help the process of debugging and optimizing.
For instance, we can obtain physical reads of a single query consumed. This metric indicates disk I/O activity, and having a high number on this may suggest the query consumed too much I/O that the instance can serve, so we know where the bottleneck is and how to fix it.

### Describe the solution you'd like

Oracle DB provides insights into query performance through multiple stats table. We propose to use the Oracle table V$SQL to fetch the query-level data. We will make changes to the the Oracle receiver to fetch the data from this table and produce corresponding metrics. Along with the query-level metrics, we also intend to fetch the query text and query execution plan. Query text would be fetched from table V$SQLSTATS, and query execution plan from V$SQL.

Concerns
However, the length of the sanitized query text and the execution plan can be very long, which exceeds the length limit of metric storage. The execution plan has a high cardinality value that does not fit into the metric storage.

To solve this problem, we propose sending query texts and execution plans in logs. So, every query result fetched from the SQL server would populate a metric and a corresponding log.

### Describe alternatives you've considered

None

### Additional context

We (a Splunk team) are interested in implementing this feature. But, since using logs like this is not what a common receiver would do, we would like to know whether the community can accept this or not before we work on the implementation.

Other receivers that have a similar approach:

k8sclusterreceiver: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/40dbf0b5487fd20e2024b66d72cd9945b90eca98/receiver/k8sclusterreceiver


Discussion:
Pinging code owners:
- receiver/oracledb: @dmitryax @crobert-1 @atoulme

 See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself.

Hello @akshayAppd19, thanks for submitting this issue and for including so much information, it's really helpful!

This issue seems to have two main proposals, the first being adding metrics for SQL queries from the [V$SQL](https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/V-SQL.html) and [V$SQLSTATS table](https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/V-SQLSTATS.html). I think this is a great idea, happy to have these added!

The second part of this request is adding logs support to help fill out query information that doesn't fit in the metrics. The receiver would be used in two instances in this case, so the logs receiver would be duplicating the queries made by the metrics receiver. One receiver instance can't create metrics and logs at the same time from the same data. My other main concern is that the query and query plan data doesn't change often, so my guess is that it would need to be scraped less frequently than metrics, but frequently enough that changes are caught in a timely manner.

Ideally, there'd be some unique value for a SQL query and plan that could be added to the metric which could be used to effectively communicate which query it is, and which plan. This would greatly simplify the logic and UX of components in the Collector.

This isn't a blocker for me, but I'd want to make sure there's no other column from either table that could be used for a query to effectively map the value to the query in Oracle DB.

Can you confirm there's no HASH or ID value in either table (V$SQL or V$SQLSTATS) that can be used instead of your proposed solution?
Hello @crobert-1 yes we do want to cache query test as it won't change frequently. However, in Oracle, query plan may change even if the text doesn't change. So, we are still exploring if caching query plan would be useful or not. 
The SQL_ID attribute would be used to map the metric with a query. We would use SQL_ID to fetch the query text too.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments), or if you are unsure of which component this issue relates to, please ping `@open-telemetry/collector-contrib-triagers`. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:
- receiver/oracledbreceiver: @dmitryax @crobert-1 @atoulme

See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself.

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments), or if you are unsure of which component this issue relates to, please ping `@open-telemetry/collector-contrib-triagers`. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:
- receiver/oracledbreceiver: @dmitryax @crobert-1 @atoulme

See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself.

This issue has work in progress. Will be raising a PR over this week.

cc @dmitryax 
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments), or if you are unsure of which component this issue relates to, please ping `@open-telemetry/collector-contrib-triagers`. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:
- receiver/oracledbreceiver: @dmitryax @crobert-1 @atoulme

See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself.

This issue is still relevant since we have a few more minor updates to make over the next two weeks.
> This issue is still relevant since we have a few more minor updates to make over the next two weeks.

@dmitryax @crobert-1 @atoulme 



Patch:
diff --git a/.chloggen/oracle_sql_case_fix.yaml b/.chloggen/oracle_sql_case_fix.yaml
new file mode 100644
index 0000000000000..bf10cba37b4c5
--- /dev/null
+++ b/.chloggen/oracle_sql_case_fix.yaml
@@ -0,0 +1,27 @@
+# Use this changelog template to create an entry for release notes.
+
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: enhancement
+
+# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
+component: oracledbreceiver
+
+# A brief description of the change.  Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Removing the toLowercase conversion on sql text in top_query payload. Also, adding child_address into the query_samples payload.
+
+# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
+issues: [37478]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
+
+# If your change doesn't affect end users or the exported elements of any package,
+# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
+# Optional: The change log or logs in which this entry should be included.
+# e.g. '[user]' or '[user, api]'
+# Include 'user' if the change is relevant to end users.
+# Include 'api' if there is a change to a library API.
+# Default: '[user]'
+change_logs: [user]
diff --git a/receiver/oracledbreceiver/documentation.md b/receiver/oracledbreceiver/documentation.md
index 5697e29f81faa..026c88fc56dbb 100644
--- a/receiver/oracledbreceiver/documentation.md
+++ b/receiver/oracledbreceiver/documentation.md
@@ -416,6 +416,7 @@ sample query
 | oracledb.plan_hash_value | Binary hash value calculated on the query execution plan and used to identify similar query execution plans, reported in the HEX format. | Any Str |
 | oracledb.sql_id | The SQL ID of the query. | Any Str |
 | oracledb.child_number | The child number of the query. | Any Str |
+| oracledb.child_address | Address of the child cursor. | Any Str |
 | oracledb.sid | ID of the Oracle Server session. | Any Str |
 | oracledb.serial | Serial number associated with a session. | Any Str |
 | oracledb.process | The operating system process ID (PID) associated with a session. | Any Str |
diff --git a/receiver/oracledbreceiver/internal/metadata/generated_logs.go b/receiver/oracledbreceiver/internal/metadata/generated_logs.go
index 5d92fbddba142..0f6fc7e3d10d7 100644
--- a/receiver/oracledbreceiver/internal/metadata/generated_logs.go
+++ b/receiver/oracledbreceiver/internal/metadata/generated_logs.go
@@ -18,7 +18,7 @@ type eventDbServerQuerySample struct {
 	config EventConfig         // event config provided by user.
 }
 
-func (e *eventDbServerQuerySample) recordEvent(ctx context.Context, timestamp pcommon.Timestamp, dbQueryTextAttributeValue string, dbSystemNameAttributeValue string, userNameAttributeValue string, dbNamespaceAttributeValue string, clientAddressAttributeValue string, clientPortAttributeValue int64, networkPeerAddressAttributeValue string, networkPeerPortAttributeValue int64, oracledbPlanHashValueAttributeValue string, oracledbSQLIDAttributeValue string, oracledbChildNumberAttributeValue string, oracledbSidAttributeValue string, oracledbSerialAttributeValue string, oracledbProcessAttributeValue string, oracledbSchemanameAttributeValue string, oracledbProgramAttributeValue string, oracledbModuleAttributeValue string, oracledbStatusAttributeValue string, oracledbStateAttributeValue string, oracledbWaitClassAttributeValue string, oracledbEventAttributeValue string, oracledbObjectNameAttributeValue string, oracledbObjectTypeAttributeValue string, oracledbOsuserAttributeValue string, oracledbDurationSecAttributeValue float64) {
+func (e *eventDbServerQuerySample) recordEvent(ctx context.Context, timestamp pcommon.Timestamp, dbQueryTextAttributeValue string, dbSystemNameAttributeValue string, userNameAttributeValue string, dbNamespaceAttributeValue string, clientAddressAttributeValue string, clientPortAttributeValue int64, networkPeerAddressAttributeValue string, networkPeerPortAttributeValue int64, oracledbPlanHashValueAttributeValue string, oracledbSQLIDAttributeValue string, oracledbChildNumberAttributeValue string, oracledbChildAddressAttributeValue string, oracledbSidAttributeValue string, oracledbSerialAttributeValue string, oracledbProcessAttributeValue string, oracledbSchemanameAttributeValue string, oracledbProgramAttributeValue string, oracledbModuleAttributeValue string, oracledbStatusAttributeValue string, oracledbStateAttributeValue string, oracledbWaitClassAttributeValue string, oracledbEventAttributeValue string, oracledbObjectNameAttributeValue string, oracledbObjectTypeAttributeValue string, oracledbOsuserAttributeValue string, oracledbDurationSecAttributeValue float64) {
 	if !e.config.Enabled {
 		return
 	}
@@ -41,6 +41,7 @@ func (e *eventDbServerQuerySample) recordEvent(ctx context.Context, timestamp pc
 	dp.Attributes().PutStr("oracledb.plan_hash_value", oracledbPlanHashValueAttributeValue)
 	dp.Attributes().PutStr("oracledb.sql_id", oracledbSQLIDAttributeValue)
 	dp.Attributes().PutStr("oracledb.child_number", oracledbChildNumberAttributeValue)
+	dp.Attributes().PutStr("oracledb.child_address", oracledbChildAddressAttributeValue)
 	dp.Attributes().PutStr("oracledb.sid", oracledbSidAttributeValue)
 	dp.Attributes().PutStr("oracledb.serial", oracledbSerialAttributeValue)
 	dp.Attributes().PutStr("oracledb.process", oracledbProcessAttributeValue)
@@ -254,8 +255,8 @@ func (lb *LogsBuilder) Emit(options ...ResourceLogsOption) plog.Logs {
 }
 
 // RecordDbServerQuerySampleEvent adds a log record of db.server.query_sample event.
-func (lb *LogsBuilder) RecordDbServerQuerySampleEvent(ctx context.Context, timestamp pcommon.Timestamp, dbQueryTextAttributeValue string, dbSystemNameAttributeValue string, userNameAttributeValue string, dbNamespaceAttributeValue string, clientAddressAttributeValue string, clientPortAttributeValue int64, networkPeerAddressAttributeValue string, networkPeerPortAttributeValue int64, oracledbPlanHashValueAttributeValue string, oracledbSQLIDAttributeValue string, oracledbChildNumberAttributeValue string, oracledbSidAttributeValue string, oracledbSerialAttributeValue string, oracledbProcessAttributeValue string, oracledbSchemanameAttributeValue string, oracledbProgramAttributeValue string, oracledbModuleAttributeValue string, oracledbStatusAttributeValue string, oracledbStateAttributeValue string, oracledbWaitClassAttributeValue string, oracledbEventAttributeValue string, oracledbObjectNameAttributeValue string, oracledbObjectTypeAttributeValue string, oracledbOsuserAttributeValue string, oracledbDurationSecAttributeValue float64) {
-	lb.eventDbServerQuerySample.recordEvent(ctx, timestamp, dbQueryTextAttributeValue, dbSystemNameAttributeValue, userNameAttributeValue, dbNamespaceAttributeValue, clientAddressAttributeValue, clientPortAttributeValue, networkPeerAddressAttributeValue, networkPeerPortAttributeValue, oracledbPlanHashValueAttributeValue, oracledbSQLIDAttributeValue, oracledbChildNumberAttributeValue, oracledbSidAttributeValue, oracledbSerialAttributeValue, oracledbProcessAttributeValue, oracledbSchemanameAttributeValue, oracledbProgramAttributeValue, oracledbModuleAttributeValue, oracledbStatusAttributeValue, oracledbStateAttributeValue, oracledbWaitClassAttributeValue, oracledbEventAttributeValue, oracledbObjectNameAttributeValue, oracledbObjectTypeAttributeValue, oracledbOsuserAttributeValue, oracledbDurationSecAttributeValue)
+func (lb *LogsBuilder) RecordDbServerQuerySampleEvent(ctx context.Context, timestamp pcommon.Timestamp, dbQueryTextAttributeValue string, dbSystemNameAttributeValue string, userNameAttributeValue string, dbNamespaceAttributeValue string, clientAddressAttributeValue string, clientPortAttributeValue int64, networkPeerAddressAttributeValue string, networkPeerPortAttributeValue int64, oracledbPlanHashValueAttributeValue string, oracledbSQLIDAttributeValue string, oracledbChildNumberAttributeValue string, oracledbChildAddressAttributeValue string, oracledbSidAttributeValue string, oracledbSerialAttributeValue string, oracledbProcessAttributeValue string, oracledbSchemanameAttributeValue string, oracledbProgramAttributeValue string, oracledbModuleAttributeValue string, oracledbStatusAttributeValue string, oracledbStateAttributeValue string, oracledbWaitClassAttributeValue string, oracledbEventAttributeValue string, oracledbObjectNameAttributeValue string, oracledbObjectTypeAttributeValue string, oracledbOsuserAttributeValue string, oracledbDurationSecAttributeValue float64) {
+	lb.eventDbServerQuerySample.recordEvent(ctx, timestamp, dbQueryTextAttributeValue, dbSystemNameAttributeValue, userNameAttributeValue, dbNamespaceAttributeValue, clientAddressAttributeValue, clientPortAttributeValue, networkPeerAddressAttributeValue, networkPeerPortAttributeValue, oracledbPlanHashValueAttributeValue, oracledbSQLIDAttributeValue, oracledbChildNumberAttributeValue, oracledbChildAddressAttributeValue, oracledbSidAttributeValue, oracledbSerialAttributeValue, oracledbProcessAttributeValue, oracledbSchemanameAttributeValue, oracledbProgramAttributeValue, oracledbModuleAttributeValue, oracledbStatusAttributeValue, oracledbStateAttributeValue, oracledbWaitClassAttributeValue, oracledbEventAttributeValue, oracledbObjectNameAttributeValue, oracledbObjectTypeAttributeValue, oracledbOsuserAttributeValue, oracledbDurationSecAttributeValue)
 }
 
 // RecordDbServerTopQueryEvent adds a log record of db.server.top_query event.
diff --git a/receiver/oracledbreceiver/metadata.yaml b/receiver/oracledbreceiver/metadata.yaml
index d23b279a8f245..ba4844aef6a13 100644
--- a/receiver/oracledbreceiver/metadata.yaml
+++ b/receiver/oracledbreceiver/metadata.yaml
@@ -207,6 +207,7 @@ events:
       - oracledb.plan_hash_value
       - oracledb.sql_id
       - oracledb.child_number
+      - oracledb.child_address
       - oracledb.sid
       - oracledb.serial
       - oracledb.process
diff --git a/receiver/oracledbreceiver/scraper.go b/receiver/oracledbreceiver/scraper.go
index 9e0dd2cb34227..5982168132851 100644
--- a/receiver/oracledbreceiver/scraper.go
+++ b/receiver/oracledbreceiver/scraper.go
@@ -695,6 +695,7 @@ func (s *oracleScraper) collectQuerySamples(ctx context.Context, logs plog.Logs)
 	const sqlID = "SQL_ID"
 	const schemaName = "SCHEMANAME"
 	const sqlChildNumber = "SQL_CHILD_NUMBER"
+	const childAddress = "CHILD_ADDRESS"
 	const sid = "SID"
 	const serialNumber = "SERIAL#"
 	const status = "STATUS"
@@ -748,7 +749,7 @@ func (s *oracleScraper) collectQuerySamples(ctx context.Context, logs plog.Logs)
 		})
 
 		s.lb.RecordDbServerQuerySampleEvent(queryContext, timestamp, obfuscatedSQL, dbSystemNameVal, row[username], row[serviceName], row[hostName],
-			clientPort, row[hostName], clientPort, queryPlanHashVal, row[sqlID], row[sqlChildNumber], row[sid], row[serialNumber], row[process],
+			clientPort, row[hostName], clientPort, queryPlanHashVal, row[sqlID], row[sqlChildNumber], row[childAddress], row[sid], row[serialNumber], row[process],
 			row[schemaName], row[program], row[module], row[status], row[state], row[waitclass], row[event], row[objectName], row[objectType],
 			row[osUser], queryDuration)
 	}
@@ -770,8 +771,7 @@ func (s *oracleScraper) obfuscateCacheHits(hits []queryMetricCacheHit) []queryMe
 		if err != nil {
 			s.logger.Error("oracleScraper failed getting metric rows", zap.Error(err))
 		} else {
-			obfuscatedSQLLowerCase := strings.ToLower(obfuscatedSQL)
-			hit.queryText = obfuscatedSQLLowerCase
+			hit.queryText = obfuscatedSQL
 			obfuscatedHits = append(obfuscatedHits, hit)
 		}
 	}
diff --git a/receiver/oracledbreceiver/templates/oracleQuerySampleSql.tmpl b/receiver/oracledbreceiver/templates/oracleQuerySampleSql.tmpl
index d81761811ee59..321e80dd7a192 100644
--- a/receiver/oracledbreceiver/templates/oracleQuerySampleSql.tmpl
+++ b/receiver/oracledbreceiver/templates/oracleQuerySampleSql.tmpl
@@ -5,6 +5,7 @@ S.USERNAME,
 S.SCHEMANAME,
 S.SQL_ID,
 S.SQL_CHILD_NUMBER,
+RAWTOHEX(Q.CHILD_ADDRESS) AS CHILD_ADDRESS,
 S.SID,
 S.SERIAL#,
 Q.SQL_FULLTEXT,
@@ -29,6 +30,6 @@ CASE WHEN S.PLSQL_ENTRY_OBJECT_ID IS NOT NULL
       END AS OBJECT_NAME, P.OBJECT_TYPE
 FROM V$SESSION S LEFT JOIN DBA_PROCEDURES P ON S.PLSQL_ENTRY_OBJECT_ID = P.OBJECT_ID
       AND S.PLSQL_ENTRY_SUBPROGRAM_ID = P.SUBPROGRAM_ID
-      LEFT JOIN V$SQL Q ON S.SQL_ID = Q.SQL_ID
+      JOIN V$SQL Q ON S.SQL_ID = Q.SQL_ID AND S.SQL_CHILD_NUMBER = Q.CHILD_NUMBER
       WHERE S.SQL_ID IS NOT NULL AND S.STATUS = 'ACTIVE'
 FETCH FIRST :1 ROWS ONLY


Test patch:
diff --git a/receiver/oracledbreceiver/internal/metadata/generated_logs_test.go b/receiver/oracledbreceiver/internal/metadata/generated_logs_test.go
index 2e0f3e86e1230..50d8d146f74c1 100644
--- a/receiver/oracledbreceiver/internal/metadata/generated_logs_test.go
+++ b/receiver/oracledbreceiver/internal/metadata/generated_logs_test.go
@@ -130,7 +130,7 @@ func TestLogsBuilder(t *testing.T) {
 			allEventsCount := 0
 
 			allEventsCount++
-			lb.RecordDbServerQuerySampleEvent(ctx, timestamp, "db.query.text-val", "db.system.name-val", "user.name-val", "db.namespace-val", "client.address-val", 11, "network.peer.address-val", 17, "oracledb.plan_hash_value-val", "oracledb.sql_id-val", "oracledb.child_number-val", "oracledb.sid-val", "oracledb.serial-val", "oracledb.process-val", "oracledb.schemaname-val", "oracledb.program-val", "oracledb.module-val", "oracledb.status-val", "oracledb.state-val", "oracledb.wait_class-val", "oracledb.event-val", "oracledb.object_name-val", "oracledb.object_type-val", "oracledb.osuser-val", 21.100000)
+			lb.RecordDbServerQuerySampleEvent(ctx, timestamp, "db.query.text-val", "db.system.name-val", "user.name-val", "db.namespace-val", "client.address-val", 11, "network.peer.address-val", 17, "oracledb.plan_hash_value-val", "oracledb.sql_id-val", "oracledb.child_number-val", "oracledb.child_address-val", "oracledb.sid-val", "oracledb.serial-val", "oracledb.process-val", "oracledb.schemaname-val", "oracledb.program-val", "oracledb.module-val", "oracledb.status-val", "oracledb.state-val", "oracledb.wait_class-val", "oracledb.event-val", "oracledb.object_name-val", "oracledb.object_type-val", "oracledb.osuser-val", 21.100000)
 
 			allEventsCount++
 			lb.RecordDbServerTopQueryEvent(ctx, timestamp, "db.system.name-val", "db.server.name-val", "db.query.text-val", "oracledb.query_plan-val", "oracledb.sql_id-val", "oracledb.child_number-val", "oracledb.child_address-val", 30.100000, 20, 26.100000, 30.100000, 17.100000, 21, 22, 19, 21.100000, 19, 28, 31, 29, 32, 23, 26.100000)
@@ -200,6 +200,9 @@ func TestLogsBuilder(t *testing.T) {
 					attrVal, ok = lr.Attributes().Get("oracledb.child_number")
 					assert.True(t, ok)
 					assert.Equal(t, "oracledb.child_number-val", attrVal.Str())
+					attrVal, ok = lr.Attributes().Get("oracledb.child_address")
+					assert.True(t, ok)
+					assert.Equal(t, "oracledb.child_address-val", attrVal.Str())
 					attrVal, ok = lr.Attributes().Get("oracledb.sid")
 					assert.True(t, ok)
 					assert.Equal(t, "oracledb.sid-val", attrVal.Str())
diff --git a/receiver/oracledbreceiver/scraper_test.go b/receiver/oracledbreceiver/scraper_test.go
index 1cc38c0498664..9ccf1da1d9e2f 100644
--- a/receiver/oracledbreceiver/scraper_test.go
+++ b/receiver/oracledbreceiver/scraper_test.go
@@ -310,7 +310,7 @@ func TestScraper_ScrapeTopNLogs(t *testing.T) {
 
 var samplesQueryResponses = map[string][]metricRow{
 	samplesQuery: {{
-		"ACTION": "00-0af7651916cd43dd8448eb211c80319c-a7ad6b7169203331-01", "MACHINE": "TEST-MACHINE", "USERNAME": "ADMIN", "SCHEMANAME": "ADMIN", "SQL_ID": "48bc50b6fuz4y", "WAIT_CLASS": "ONE", "OBJECT_NAME": "BLAH",
+		"ACTION": "00-0af7651916cd43dd8448eb211c80319c-a7ad6b7169203331-01", "MACHINE": "TEST-MACHINE", "USERNAME": "ADMIN", "SCHEMANAME": "ADMIN", "SQL_ID": "48bc50b6fuz4y", "WAIT_CLASS": "ONE", "OBJECT_NAME": "BLAH", "CHILD_ADDRESS": "SDF3SDF1234D",
 		"SQL_CHILD_NUMBER": "0", "SID": "675", "SERIAL#": "51295", "SQL_FULLTEXT": "test_query", "OSUSER": "test-user", "PROCESS": "1115", "OBJECT_TYPE": "OBJECT_TYPE-A",
 		"PORT": "54440", "PROGRAM": "Oracle SQL Developer for VS Code", "MODULE": "Oracle SQL Developer for VS Code", "STATUS": "ACTIVE", "STATE": "WAITED KNOWN TIME", "PLAN_HASH_VALUE": "4199919568", "DURATION_SEC": "1",
 	}},
diff --git a/receiver/oracledbreceiver/testdata/expectedQueryTextAndPlanQuery.yaml b/receiver/oracledbreceiver/testdata/expectedQueryTextAndPlanQuery.yaml
index 3909a3e3cd306..bb36e8c1e56f7 100644
--- a/receiver/oracledbreceiver/testdata/expectedQueryTextAndPlanQuery.yaml
+++ b/receiver/oracledbreceiver/testdata/expectedQueryTextAndPlanQuery.yaml
@@ -18,7 +18,7 @@ resourceLogs:
                   stringValue: oracle-host-sample-1
               - key: db.query.text
                 value:
-                  stringValue: select count ( * ) from admin. employee e join admin. person p on e. businessentityid = ? join admin. employeepayhistory eph on e. businessentityid = eph. businessentityid where eph. rate > ( select avg ( rate ) from admin. employeepayhistory )
+                  stringValue: SELECT COUNT ( * ) FROM ADMIN. Employee e JOIN ADMIN. Person p ON e. BusinessEntityID = ? JOIN ADMIN. EmployeePayHistory eph ON e. BusinessEntityID = eph. BusinessEntityID WHERE eph. Rate > ( SELECT AVG ( Rate ) FROM ADMIN. EmployeePayHistory )
               - key: oracledb.query_plan
                 value:
                   stringValue: '[{"ACCESS_PREDICATES":"","BYTES":"","CARDINALITY":"","COST":"1","CPU_COST":"","DEPTH":"0","ID":"0","IO_COST":"","OPERATION":"SELECT STATEMENT","OPTIONS":"FULL","PARENT_ID":"","POSITION":"1","PROJECTION":""}]'
diff --git a/receiver/oracledbreceiver/testdata/expectedSamplesFile.yaml b/receiver/oracledbreceiver/testdata/expectedSamplesFile.yaml
index 9276e2427b048..097b8c6a7609e 100644
--- a/receiver/oracledbreceiver/testdata/expectedSamplesFile.yaml
+++ b/receiver/oracledbreceiver/testdata/expectedSamplesFile.yaml
@@ -43,6 +43,9 @@ resourceLogs:
               - key: oracledb.child_number
                 value:
                   stringValue: "0"
+              - key: oracledb.child_address
+                value:
+                  stringValue: "SDF3SDF1234D"
               - key: oracledb.sid
                 value:
                   stringValue: "675"