Skip to content

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.

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.

  • EventLog in course-builder dispatches BuilderStageStarted and BuilderStageFinished next to every AG-UI step and run event; the builder does not know this package.
  • RecordStageTimings turns them into authoring_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, one coarse whole-run row from the run row for older runs. Idempotent; ulams:upgrade runs it once per tenant.

Admin and developer documentation: front/docs-site/src/content/docs/operators/authoring-metrics.mdx.

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
Permission Seeded for roles Constant
authoring_metrics_read AuthoringMetricsPermissionsEnum::READ

Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).

None.

None.

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)}
Kind Target Frequency
command 'authoring-metrics:recompute --active' dailyAt('03:20')->withoutOverlapping())

None.