Skip to content

Issue #1179: Add metric for export types#7765

Open
labkey-susanh wants to merge 2 commits into
developfrom
fb_exportMetricsFromAudit
Open

Issue #1179: Add metric for export types#7765
labkey-susanh wants to merge 2 commits into
developfrom
fb_exportMetricsFromAudit

Conversation

@labkey-susanh

Copy link
Copy Markdown
Contributor

Rationale

Issue 1179 - Before we make changes to improve the UI for exporting multi-tab Excel files, we want to look at metrics to understand how often this feature is being used. We record and audit log in a dedicated table for each export and can use that to report numbers.

Changes

  • Add a Postgres-only metric based on the export audit log

@labkey-susanh labkey-susanh requested a review from XingY June 19, 2026 17:57

// This is an approximation of the multi-tab export count. We record an audit log for each tab, and
// they are all likely to have the same timestamp. Not exact, but perhaps good enough for current purposes.
sql = new SQLFragment("SELECT COUNT(*) FROM (SELECT *\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add group by createdby?

String comment = (String) row.get("Comment");
if (comment == null)
return;
if (comment.startsWith("Exported to "))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this exclude Multi-tab excel export? Or the excel count will be way bloated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants