You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Operation records and metrics miscount: PartiQL writes, throttles of failed calls, batch retries and rows #90
client.metrics() counts PartiQL write capacity as reads (crates/dynamoxy-core/src/client.rs, capacity! maps ExecuteStatementOutput, BatchExecuteStatementOutput and ExecuteTransactionOutput to read, and units() ignores a reported read/write split). Three INSERTs show read_capacity_units=3.0, write=0.0, while collect() shows write 1.0 each.
Failed calls lose their throttle count (client.py, _failure_record sets throttles=0; the binding passes only attempts and duration): a GetItem throttled on all 3 attempts records 0 throttles, dynamoxy.request.throttles has no data point and the span no dynamoxy.throttles, while client.metrics() says 3.
collect().summary()["retries"] counts batch chunks as retries (telemetry.py, retries = sum(attempts - 1)): managed batches add up the attempts of all their requests, and OperationStats.requests means attempts for single calls but rounds for batches. A 60-item batch_write without throttling reports 2 retries.
A batch that ends in UnprocessedItemsError is recorded as a success (table.py, repository.py, batch.py raise after client.call recorded it): operation.succeeded is emitted, collect().errors is 0 and the span status is unset.
db.client.response.returned_rows counts written items (telemetry.py, _items_of in client.py): writes record 1 or the number of items written, for an instrument described as "Items returned".
Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.
Activity
fix(telemetry): records and metrics count PartiQL writes, throttles o…