Skip to content

Commit f17e930

Browse files
committed
[receiver/oracledb] Add transaction, lock, and recovery metrics
Surfaces transaction-rollback, lock-timing, recovery, SMON, and RAC cache-fusion statistics already returned by the existing system-statistics query as seven opt-in metrics. No new SQL queries are introduced.
1 parent d119753 commit f17e930

10 files changed

Lines changed: 1297 additions & 2 deletions
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
7+
component: receiver/oracledb
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Add transaction, lock, and recovery metrics sourced from the existing v$sysstat query.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [49064]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
Adds oracledb.transaction.rollbacks, oracledb.lock.time (attribute oracledb.lock.kind),
20+
oracledb.lock.wait.time, oracledb.recovery.blocks_read, oracledb.smon.instance_recovery.posts,
21+
oracledb.smon.txn_recovery.posts, and oracledb.gc.current_block.receive.time. All are disabled
22+
by default and add no new database queries.
23+
24+
# If your change doesn't affect end users or the exported elements of any package,
25+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
26+
# Optional: The change log or logs in which this entry should be included.
27+
# e.g. '[user]' or '[user, api]'
28+
# Include 'user' if the change is relevant to end users.
29+
# Include 'api' if there is a change to a library API.
30+
# Default: '[user]'
31+
change_logs: [user]

receiver/oracledbreceiver/documentation.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,14 @@ Fraction of executions that did not require a parse, as computed by Oracle V$SYS
319319
| ---- | ----------- | ------ | ----------------- | ------------------- |
320320
| oracledb.parse.type | Type of parse operation (e.g., soft). | Str: ``soft`` | Recommended | - |
321321
322+
### oracledb.gc.current_block.receive.time
323+
324+
Cumulative time spent receiving current blocks from other instances over RAC cache fusion, in seconds (converted from centiseconds). Sourced from v$sysstat name gc current block receive time.
325+
326+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
327+
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
328+
| s | Sum | Double | Cumulative | true | Development |
329+
322330
### oracledb.host.cpu.utilization
323331
324332
Fraction of host CPU time in use, as computed by Oracle V$SYSMETRIC (% Busy/(Idle+Busy)).
@@ -335,6 +343,28 @@ Fraction of library cache pin requests that found the object already cached, as
335343
| ---- | ----------- | ---------- | --------- |
336344
| % | Gauge | Double | Development |
337345
346+
### oracledb.lock.time
347+
348+
Cumulative time spent on transaction lock activity, in seconds (converted from centiseconds). Sourced from v$sysstat names transaction lock background get time (oracledb.lock.kind=background) and transaction lock foreground wait time (oracledb.lock.kind=foreground).
349+
350+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
351+
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
352+
| s | Sum | Double | Cumulative | true | Development |
353+
354+
#### Attributes
355+
356+
| Name | Description | Values | Requirement Level | Semantic Convention |
357+
| ---- | ----------- | ------ | ----------------- | ------------------- |
358+
| oracledb.lock.kind | Whether the lock timing is accumulated by background (get) or foreground (wait) sessions. | Str: ``background``, ``foreground`` | Recommended | - |
359+
360+
### oracledb.lock.wait.time
361+
362+
Cumulative total time sessions spent waiting on locks, in seconds (converted from centiseconds). Sourced from v$sysstat name Total Lock Time.
363+
364+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
365+
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
366+
| s | Sum | Double | Cumulative | true | Development |
367+
338368
### oracledb.logons
339369
340370
Number of logon operations
@@ -499,6 +529,14 @@ Number of SELECT statements executed in parallel
499529
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
500530
| {queries} | Sum | Int | Cumulative | true | Development |
501531
532+
### oracledb.recovery.blocks_read
533+
534+
Number of blocks read during instance or media recovery. Sourced from v$sysstat name recovery blocks read.
535+
536+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
537+
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
538+
| {blocks} | Sum | Int | Cumulative | true | Development |
539+
502540
### oracledb.recycle_bin.limit
503541
504542
Total size of the recycle bin.
@@ -523,6 +561,22 @@ Fraction of the shared pool that is currently free, as computed by Oracle V$SYSM
523561
| ---- | ----------- | ---------- | --------- |
524562
| % | Gauge | Double | Development |
525563
564+
### oracledb.smon.instance_recovery.posts
565+
566+
Number of times SMON was posted to perform instance recovery. Sourced from v$sysstat name SMON posted for instance recovery.
567+
568+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
569+
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
570+
| {posts} | Sum | Int | Cumulative | true | Development |
571+
572+
### oracledb.smon.txn_recovery.posts
573+
574+
Number of times SMON was posted to perform transaction recovery for other instances. Sourced from v$sysstat name SMON posted for txn recovery for other instances.
575+
576+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
577+
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
578+
| {posts} | Sum | Int | Cumulative | true | Development |
579+
526580
### oracledb.sort.ratio
527581
528582
Fraction of sorts performed in memory vs disk, as computed by Oracle V$SYSMETRIC (% MemSort/(MemSort + DiskSort)). Low values indicate PGA memory pressure.
@@ -576,6 +630,14 @@ Fraction of allocated database storage that is used.
576630
| ---- | ----------- | ---------- | --------- |
577631
| 1 | Gauge | Double | Development |
578632
633+
### oracledb.transaction.rollbacks
634+
635+
Number of transactions rolled back. Sourced from v$sysstat name transaction rollbacks.
636+
637+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
638+
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
639+
| {rollbacks} | Sum | Int | Cumulative | true | Development |
640+
579641
## Default Events
580642
581643
The following events are emitted by default. Each of them can be disabled by applying the following configuration:

0 commit comments

Comments
 (0)