msrathore-db opened a new pull request, #3617:
URL: https://github.com/apache/arrow-adbc/pull/3617
## Summary
Adds comprehensive Activity-based logging to `DatabricksStatement.cs` for
improved observability and debugging of Databricks ADBC operations.
## Changes
### Methods with Logging Added
- **`SetStatementProperties`**: Logs configuration (Arrow native types,
CloudFetch settings, async mode)
- **`GetSchemaFromMetadata`**: Logs schema parsing decisions (Arrow vs
Thrift, column count)
- **`GetCatalogsAsync`**: Logs catalog queries with feature flags and row
counts
- **`GetSchemasAsync`**: Logs schema queries with catalog filtering
- **`GetTablesAsync`**: Logs table queries with SPARK catalog handling
- **`GetColumnsAsync`**: Logs column queries with search criteria
- **`GetPrimaryKeysAsync`**: Logs primary key queries
- **`GetCrossReferenceAsync`**: Logs foreign key queries
- **`GetColumnsExtendedAsync`**: Logs DESC TABLE EXTENDED queries
- **`SetOption`**: Logs configuration changes
### What Gets Logged
**Tags:**
- Statement configuration (CloudFetch settings, Arrow native types, batch
size)
- Feature flags (`enable_multiple_catalog_support`, `pk_fk_enabled`)
- Query parameters (catalog, schema, table, column names)
- Results (`db.response.returned_rows`)
**Events:**
- `statement.<operation>.start` / `statement.<operation>.complete`
- Decision points (`calling_base_implementation`, `returning_empty_result`,
`fallback_to_base`)
- Schema handling (`using_arrow_schema`, `fallback_to_thrift`)
## Example Log Output
```json
{
"OperationName": "GetCatalogs",
"Duration": "00:00:00.582",
"TagObjects": {
"statement.feature.enable_multiple_catalog_support": true,
"db.response.returned_rows": 28
},
"Events": [
{ "Name": "statement.get_catalogs.start" },
{ "Name": "statement.get_catalogs.calling_base_implementation" },
{ "Name": "statement.get_catalogs.complete" }
]
}
```
## Testing
Tested locally by enabling logging with:
```csharp
properties["adbc.traces.exporter"] = "adbcfile";
```
Verified that all tags, events, and distributed tracing context are captured
correctly in trace files for all implemented methods (GetCatalogs, GetSchemas,
GetTables, GetColumns, and statement configuration).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]