Repository navigation
Description
Goal
Move the torrust-metrics crate out of the torrust-tracker workspace into its own standalone repository so that it can be maintained, versioned, and published independently of the tracker.
Background
The torrust-metrics package provides Prometheus metrics integration types for the tracker. Its relevant internal dependency is torrust-clock, which is already published on crates.io. After the torrust-tracker-metrics -> torrust-metrics rename (SI-08, #1819), extraction is unblocked. Publishing the renamed crate on crates.io is the first technical step of the extraction itself (T1b), following the project policy of deferring publication as late as possible.
Prerequisite: Metrics rename subissue (#1819) complete (SI-08 all tasks done).
This issue is a subissue of EPIC #1669 (Overhaul: Packages).
Scope
In Scope
- Create a new standalone repository
torrust/torrust-metricsin the Torrust GitHub organization. - Move
packages/metrics/to the new repository, preserving git history (usinggit filter-repo). - Verify the standalone repository builds and tests pass independently.
- Set up CI in the new repository (mirror the relevant CI workflows from the tracker repo).
- Update all 7 workspace consumers to reference
torrust-metricsas a crates.io version dependency instead of a path dependency (see list below). - Update the root
Cargo.tomlworkspace dep registration fortorrust-metrics. - Remove
packages/metricsfrom the workspacememberslist in rootCargo.toml. - Delete the
packages/metrics/directory from the tracker repository. - Update prose references in
packages/AGENTS.md,AGENTS.md, anddocs/packages.md(movetorrust-metricsto the "Extracted" section).
Out of Scope
- Changes to the crate's API or behaviour.
- Updating downstream repositories outside the Torrust organization.
Workspace consumers to migrate
The following 7 packages must have their torrust-metrics dep changed from a path dep to a crates.io version dep:
packages/swarm-coordination-registry/Cargo.tomlpackages/rest-tracker-api-core/Cargo.tomlpackages/udp-tracker-core/Cargo.tomlpackages/axum-rest-tracker-api-server/Cargo.tomlpackages/udp-tracker-server/Cargo.tomlpackages/tracker-core/Cargo.tomlpackages/http-tracker-core/Cargo.toml
Acceptance Criteria
- A standalone repository
torrust/torrust-metricsexists on GitHub. - The repository contains the full git history for
packages/metrics/. - CI in the new repository passes.
- No
Cargo.tomlin the tracker workspace referencestorrust-metricswith a path dep. packages/metricsis absent from the[workspace]members list in rootCargo.toml.- The
packages/metrics/directory no longer exists in the tracker repository. cargo build --workspacein the tracker repository succeeds with zero errors.cargo test --workspacein the tracker repository passes with zero failures.linter allexits with code0.packages/AGENTS.md,AGENTS.md, anddocs/packages.mdreflect the extraction.
Activity
chore(issues): promote draft torrust#1882 extract-torrust-metrics to …
Merge #1886: chore(issues): maintain issue specs — archive closed, pr…
feat: extract torrust-metrics to standalone repository (#1882)
docs: update EPIC #1669 tables for completed metrics extraction
Merge #1892: feat: extract torrust-metrics to standalone repository (#…
josecelano commentedon Jun 9, 2026
Implemented via #1885
chore(docs): archive 7 closed issue specs from open/ to closed/
Merge #1901: chore(docs): archive closed issue specs and add branch-n…
feat(spec): add subissue spec for extracting torrust-server-lib to st…