-
Notifications
You must be signed in to change notification settings - Fork 1
Integration Bigtable Extension
Track Google Cloud Bigtable operations in your test diagrams using the Kronikol.Extensions.Bigtable NuGet package. This extension wraps BigtableClient to capture row-level operations with table name extraction and configurable verbosity.
Using a shared library or abstraction layer? If your code doesn't use the Bigtable SDK directly — e.g. it goes through a shared data-access library, wrapper, or custom abstraction — this extension won't be able to intercept the underlying calls. See Tracking Custom Dependencies for alternative approaches including
RequestResponseLogger.LogPair(),TrackingProxy<T>, andMessageTracker.
dotnet add package Kronikol.Extensions.Bigtable
Google Cloud Bigtable uses gRPC internally, so DelegatingHandler interception is not viable. Instead, this extension uses a tracker/classifier pattern:
-
BigtableTrackerimplementsITrackingComponentand handles request/response logging withRequestResponseMetaType.EventandDependencyCategory: "Bigtable" -
BigtableOperationClassifierclassifies method calls into operation types and generates diagram labels
| Operation | Enum Value | Description |
|---|---|---|
| Read rows | BigtableOperation.ReadRows |
Read one or more rows with optional filters |
| Mutate single row | BigtableOperation.MutateRow |
Apply mutations to a single row |
| Mutate multiple rows | BigtableOperation.MutateRows |
Batch mutations across multiple rows |
| Check and mutate | BigtableOperation.CheckAndMutateRow |
Conditional mutation (read-modify-write) |
| Read-modify-write | BigtableOperation.ReadModifyWriteRow |
Atomic read-modify-write on a single row |
| Sample row keys | BigtableOperation.SampleRowKeys |
Get a sample of row keys for splitting |
-
Label: Short operation name (e.g.
ReadRows,MutateRow,CheckAndMutate) - Content: Omitted
-
URI:
bigtable:///my-table
-
Label: Operation with table name (e.g.
ReadRows ← my-table,MutateRow → my-table,MutateRows (×5) → my-table) - Content: Included
-
URI:
bigtable:///my-table(short name extracted from full resource path)
- Label: Full info including resource paths and row keys
- Content: Full details
-
URI:
bigtable:///projects/p/instances/i/tables/my-table
Bigtable uses full resource paths like projects/my-project/instances/my-instance/tables/my-table. At Detailed and Summarised verbosity, the short table name is extracted:
-
projects/my-project/instances/my-instance/tables/my-table→my-table
using Kronikol.Extensions.Bigtable;
var tracker = new BigtableTracker(new BigtableTrackingOptions
{
ServiceName = "Bigtable",
CallerName = "OrdersApi",
CurrentTestInfoFetcher = CurrentTestInfo.Fetcher
});
// Classify and log
var op = BigtableOperationClassifier.Classify("ReadRows", tableName);
var (reqId, traceId) = tracker.LogRequest(op, "filter expression");
// ... execute Bigtable operation ...
tracker.LogResponse(op, reqId, traceId, "5 rows returned");services.AddBigtableTestTracking(options =>
{
options.ServiceName = "Bigtable";
options.CallerName = "OrdersApi";
options.CurrentTestInfoFetcher = CurrentTestInfo.Fetcher;
});Then inject BigtableTracker where needed.
| Property | Type | Default | Description |
|---|---|---|---|
ServiceName |
string |
"Bigtable" |
Display name in diagrams for the Bigtable service |
CallerName |
string |
"Caller" |
Calling service name in diagrams |
Verbosity |
BigtableTrackingVerbosity |
Detailed |
Verbosity level (Raw, Detailed, Summarised) |
ExcludedOperations |
HashSet<BigtableOperation> |
[] |
Operations to suppress entirely (e.g. [BigtableOperation.SampleRowKeys]) |
CurrentTestInfoFetcher |
Func<(string Name, string Id)>? |
null |
Required: provides test context for log correlation |
CurrentStepTypeFetcher |
Func<string?>? |
null |
Optional — returns the current BDD step type |
SetupVerbosity |
BigtableTrackingVerbosity? |
null |
Verbosity override for the Setup phase. See Phase-Aware Tracking |
ActionVerbosity |
BigtableTrackingVerbosity? |
null |
Verbosity override for the Action phase. See Phase-Aware Tracking |
TrackDuringSetup |
bool |
true |
When false, tracking is suppressed during Setup |
TrackDuringAction |
bool |
true |
When false, tracking is suppressed during Action |
| Operation | Raw | Detailed | Summarised |
|---|---|---|---|
| Read rows | ReadRows table=projects/p/instances/i/tables/users row= |
ReadRows ← users |
ReadRows |
| Mutate single row | MutateRow table=projects/p/instances/i/tables/users row=user123 |
MutateRow → users |
MutateRow |
| Mutate batch (5 rows) | MutateRows table=projects/p/instances/i/tables/users row= |
MutateRows (×5) → users |
MutateRow |
| Check and mutate | CheckAndMutateRow table=.../users row=user123 |
CheckAndMutate → users |
CheckAndMutate |
| Read-modify-write | ReadModifyWriteRow table=.../users row=user123 |
ReadModifyWrite → users |
ReadModifyWrite |
| Sample row keys | SampleRowKeys table=.../users row= |
SampleRowKeys ← users |
SampleRowKeys |
BigtableTracker implements ITrackingComponent and auto-registers:
-
ComponentName:"BigtableTracker ({ServiceName})" -
WasInvoked:trueafter first operation -
InvocationCount: Total operations logged
Getting Started
Common Tasks
Integration Guides
- Integration xUnit3
- Integration xUnit2
- Integration NUnit
- Integration MSTest
- Integration TUnit
- Integration BDDfy xUnit3
- Integration LightBDD xUnit2
- Integration LightBDD xUnit3
- Integration LightBDD TUnit
- Integration ReqNRoll xUnit2
- Integration ReqNRoll xUnit3
- Integration ReqNRoll TUnit
Extensions
- Integration AtlasDataApi Extension
- Integration BigQuery Extension
- Integration Bigtable Extension
- Integration BlobStorage Extension
- Integration ClickHouse Extension
- Integration CloudStorage Extension
- Integration CosmosDB Extension
- Integration Dapper Extension
- Integration DynamoDB Extension
- Integration EF Core Relational Extension
- Integration Elasticsearch Extension
- Integration EventBridge Extension
- Integration EventHubs Extension
- Integration Grpc Extension
- Integration Kafka Extension
- Integration MassTransit Extension
- Integration MongoDB Extension
- Integration MySqlConnector Extension
- Integration Npgsql Extension
- Integration Oracle Extension
- Integration PubSub Extension
- Integration Redis Extension
- Integration S3 Extension
- Integration ServiceBus Extension
- Integration SNS Extension
- Integration Spanner Extension
- Integration SqlClient Extension
- Integration Sqlite Extension
- Integration SQS Extension
- Integration StorageQueues Extension
- Integration OpenTelemetry Extension
- Integration DispatchProxy Extension
- Integration MediatR Extension
- Integration PlantUML IKVM
Configuration
- Tracking Dependencies
- Tracking Custom Dependencies
- HTTP Tracking Setup
- Report Configuration
- Diagram Customisation
- Phase-Aware Tracking
- Content Formatting
- PlantUML Server Configuration
Features
- Generated Reports
- Search Syntax
- Component Diagrams
- PlantUML Browser Rendering
- Inline SVG Rendering
- Internal Flow Tracking
- Tags and Attributes
- Excluding Requests
- Excluded Headers
- Multi-Host Test Architectures
- Event-Driven Architecture Testing
- Service Bus Tracking Patterns
- Background Thread Correlation
- Parallel-Safe Background Correlation
- Event & Message Tracking
- Assertion Tracking
- Step Tracking
- Tabular Attributes
- Large Response and Diagram Handling
- Diagnostics and Debugging
- CI Summary Integration
- CI Artifact Upload
- Merging Parallel Reports
Reference