Package: authoring-metrics
Generated from api/packages/authoring-metrics
Source: api/packages/authoring-metrics. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”Measures the authoring side of the Course Builder from what the builder already does: time per pipeline
stage (this release, milestone AM-1), later cost, counts and opt-in anonymous review time. Records: ADR 0194;
plan docs/plans/authoring-metric-and-report-builder.md.
EventLogincourse-builderdispatchesBuilderStageStartedandBuilderStageFinishednext to every AG-UI step and run event; the builder does not know this package.RecordStageTimingsturns them intoauthoring_stage_timings(wall time per stage, to the millisecond). A failure in the listener is logged and never reaches the build.- Rows are kept as long as the session, unlike the AG-UI events (30 days).
php artisan authoring-metrics:backfill [--session=ID] [--dry-run]rebuilds timings of earlier runs: exact from events that still exist, onecoarsewhole-run row from the run row for older runs. Idempotent;ulams:upgraderuns it once per tenant.
Admin and developer documentation: front/docs-site/src/content/docs/operators/authoring-metrics.mdx.
API endpoints
Section titled “API endpoints”| Method | Path | Auth | Action |
|---|---|---|---|
GET |
/api/admin/authoring-metrics/courses |
yes | CourseMetricsController@index |
GET |
/api/admin/authoring-metrics/courses/export |
yes | CourseMetricsController@export |
GET |
/api/admin/authoring-metrics/courses/{course} |
yes | CourseMetricsController@show |
Permissions
Section titled “Permissions”| Permission | Seeded for roles | Constant |
|---|---|---|
authoring_metrics_read |
AuthoringMetricsPermissionsEnum::READ |
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”| Command | Description | Signature |
|---|---|---|
authoring-metrics:backfill |
Record stage timings of past Course Builder runs from the AG-UI events and the run rows (idempotent) | authoring-metrics:backfill {--session= : Only this Course Builder session id} {--chunk=200} {--dry-run : Count what would be written, write nothing} |
authoring-metrics:recompute |
Recompute the authoring metric snapshot of courses built with the Course Builder | authoring-metrics:recompute {--course= : Only this course id} {--active : Only courses whose builder session changed in the last 2 days (the nightly run)} |
Scheduled jobs
Section titled “Scheduled jobs”| Kind | Target | Frequency |
|---|---|---|
| command | 'authoring-metrics:recompute --active' |
dailyAt('03:20')->withoutOverlapping()) |
Environment variables read
Section titled “Environment variables read”None.