datasette icon indicating copy to clipboard operation
datasette copied to clipboard

`db.primary_keys()` and `db.table_columns()` don't show up in traces

Open simonw opened this issue 2 years ago • 0 comments

Noticed this while working on:

  • #1715

This code here isn't showing up in traces: https://github.com/simonw/datasette/blob/579f59dcec43a91dd7d404e00b87a00afd8515f2/datasette/views/table.py#L218-L220

Because those functions don't use the regular trace-instrumented db.execute() code path - they work directly against a connection instead: https://github.com/simonw/datasette/blob/579f59dcec43a91dd7d404e00b87a00afd8515f2/datasette/utils/init.py#L610-L626

simonw avatar Apr 26 '22 21:04 simonw