Skip to content

Conversation

@caddoo
Copy link
Contributor

@caddoo caddoo commented Dec 19, 2025

Description

The new metric table can grow, this adds a scheduled task that cleans this up.

Checklist

Basic configurable clean up task for archive metrics

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@caddoo caddoo force-pushed the dev-19750-timing-metrics branch from 887b7ba to f08ed6e Compare December 19, 2025 02:21
@caddoo caddoo requested a review from mneudert December 19, 2025 02:28
@caddoo caddoo added this to the 5.7.0 milestone Dec 19, 2025
@caddoo caddoo marked this pull request as ready for review December 19, 2025 03:37
@tzi
Copy link
Contributor

tzi commented Jan 13, 2026

@caddoo There is a UI screenshot to update here: https://builds-artifacts.matomo.org/matomo-org/matomo/dev-19776-task/20803610208/UIIntegrationTest_admin_diagnostics_configfile.png

It adds "ArchivingMetrics" as a new section in the config file.

@mneudert mneudert merged commit 1046a96 into dev-19750-timing-metrics Jan 14, 2026
27 of 29 checks passed
@mneudert mneudert deleted the dev-19776-task branch January 14, 2026 17:24
caddoo added a commit that referenced this pull request Jan 16, 2026
* Add clean up task for archive metrics

* Add deleted-site purge for archiving metrics

* Remove not needed setup/teardown

* Add strict types

* Update UI screenshot
mneudert pushed a commit that referenced this pull request Jan 16, 2026
* Add clean up task for archive metrics

* Add deleted-site purge for archiving metrics

* Remove not needed setup/teardown

* Add strict types

* Update UI screenshot
caddoo added a commit that referenced this pull request Jan 19, 2026
* Add archiving metrics code with timer

* Pass in segment/period objects where possible

* Make plugin not installed by default

* Add support back in for segment archiving

* Don't prematurely filter plugins

* Add additional test for when archive PHP not triggered

* Update UI Screenshots

* Make archiving_metrics.idarchive not null

* Store archiving period as numeric id

* Store segment hash in archiving metrics

* Derive ts_started from stored start time

* Use mocks for Timer tests

* Move ArchivingMetrics description to lang file

* Tighten ArchivingMetrics integration test

* Add strict types and license headers

* Move context field extraction into writer

* Update screenshots

* Store done flag as archive name

* Add support for report timings

* Remove null check

* Update index names

* Add check to make sure idArchives array is always 1

* Update index name

* Switch to date function

* Remove date now() function

* Add 'type' to $runs

* Add clean up task for archive metrics (#23907)

* Add clean up task for archive metrics

* Add deleted-site purge for archiving metrics

* Remove not needed setup/teardown

* Add strict types

* Update UI screenshot

* Integrate archiveReports with ArchiveMetrics timer (#23906)

* Integrate archiveReports with ArchiveMetrics timer

* Create event and hook timer into it

* Add better typing

* Make sure plugin is loaded for integration test

* Skip metrics for single-report archiving

* Add test-only timer reset helper

* Simplify archive loader test GET handling

* Add nullable type for instance

* cs fix

* Add strict types

* Allow reports to have metrics recorded

* Update test to remove mocked 'now'

* Remove report from archiving metrics context

* Add report to context only

* Clean up test

* Update documented parameter order

* Update tests to show full year <-> day cascading behaviour

* Update expected UI test files

---------

Co-authored-by: Marc Neudert <marc@innocraft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants