Skip to content

Integration Oracle Extension

aryehcitron@gmail.com edited this page May 24, 2026 · 5 revisions

The Kronikol.Extensions.Oracle package adds Oracle operation tracking to your test diagrams using a DbConnection wrapping decorator pattern.

Why wrapping? Like SQLite, Oracle.ManagedDataAccess.Core does not emit DiagnosticSource events. This extension wraps OracleConnection with TrackingOracleConnection, which intercepts all command executions and transaction operations.


How It Works

TrackingOracleConnection wraps a real OracleConnection and returns TrackingOracleCommand instances that intercept all 6 execution methods (ExecuteReader/NonQuery/Scalar × sync/async). TrackingOracleTransaction intercepts Begin/Commit/Rollback. All intercepted operations are classified by UnifiedSqlClassifier and logged to RequestResponseLogger.


Install

dotnet add package Kronikol.Extensions.Oracle

Setup

Option A — Dependency Injection

services.AddOracleTestTracking(options =>
{
    options.Verbosity = SqlTrackingVerbosityLevel.Detailed;
});

This decorates all DbConnection registrations with a type-check guard — only OracleConnection instances are wrapped; others pass through unchanged.

Option B — Manual Wrapping (No DI)

var inner = new OracleConnection("...");
var tracked = inner.WithTestTracking(new OracleTrackingOptions
{
    Verbosity = SqlTrackingVerbosityLevel.Detailed
});

await tracked.OpenAsync();
// Use tracked as your DbConnection...

Configuration

Property Default Description
ServiceName "Oracle" Participant name in diagrams
CallerName "Caller" The caller participant name
Verbosity Detailed Raw, Detailed, or Summarised
CurrentTestInfoFetcher null Returns the current test's name and ID. Required for wrapping approach
HttpContextAccessor null Optional — enables dual-resolution of test identity from HTTP headers
LogSqlText true Include full SQL text in Detailed mode
LogParameters false Include parameter values
DependencyCategory "Oracle" Controls participant shape/colour
UriScheme "oracle" URI scheme in diagram URIs
ExcludedOperations [] Operations to exclude from tracking
SetupVerbosity null Verbosity override for the Setup phase. See Phase-Aware Tracking
ActionVerbosity null Verbosity override for the Action phase. See Phase-Aware Tracking
TrackDuringSetup true When false, tracking is suppressed during Setup
TrackDuringAction true When false, tracking is suppressed during Action
LogResponseContent true Include response data in diagram arrows at all verbosity levels (v2.37.0+)
MaxResponseRows 10 Maximum rows to capture in response content
MaxValueDisplayLength 500 Truncate individual cell values beyond this length
ResponseDetail RowCountAndColumns RowCountOnly, RowCountAndColumns, or FullRows

All options inherit from SqlTrackingOptionsBase.


Verbosity Levels

Level Arrow label URI
Raw Full SQL text oracle://host/database
Detailed SELECT FROM Users oracle://host/database/Users
Summarised SELECT oracle:///database/Users

Transaction Tracking

TrackingOracleTransaction logs BEGIN TRANSACTION, COMMIT, and ROLLBACK operations automatically. These appear as separate arrows in the sequence diagram.


Response Payload Capture (v2.37.0+)

TrackingOracleCommand now captures response data from ExecuteReader and ExecuteScalar calls. Response arrows in diagrams show actual data instead of being empty. The ResponseDetail option controls the level of detail:

ResponseDetail Example output
RowCountOnly 3 rows
RowCountAndColumns (default) 3 rows [Name, Preference, CreatedAt]
FullRows JSON row preview (up to MaxResponseRows)

Set LogResponseContent = false to restore previous empty-arrow behaviour.

Home


Demo


Getting Started

Common Tasks

Integration Guides

Extensions

Configuration

Features

Reference

Clone this wiki locally