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-metrics in the Torrust GitHub organization.
- Move
packages/metrics/ to the new repository, preserving git history (using git 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-metrics as a crates.io version dependency instead of a path dependency (see list below).
- Update the root
Cargo.toml workspace dep registration for torrust-metrics.
- Remove
packages/metrics from the workspace members list in root Cargo.toml.
- Delete the
packages/metrics/ directory from the tracker repository.
- Update prose references in
packages/AGENTS.md, AGENTS.md, and docs/packages.md (move torrust-metrics to 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.toml
packages/rest-tracker-api-core/Cargo.toml
packages/udp-tracker-core/Cargo.toml
packages/axum-rest-tracker-api-server/Cargo.toml
packages/udp-tracker-server/Cargo.toml
packages/tracker-core/Cargo.toml
packages/http-tracker-core/Cargo.toml
Acceptance Criteria
- A standalone repository
torrust/torrust-metrics exists on GitHub.
- The repository contains the full git history for
packages/metrics/.
- CI in the new repository passes.
- No
Cargo.toml in the tracker workspace references torrust-metrics with a path dep.
packages/metrics is absent from the [workspace] members list in root Cargo.toml.
- The
packages/metrics/ directory no longer exists in the tracker repository.
cargo build --workspace in the tracker repository succeeds with zero errors.
cargo test --workspace in the tracker repository passes with zero failures.
linter all exits with code 0.
packages/AGENTS.md, AGENTS.md, and docs/packages.md reflect the extraction.
Goal
Move the
torrust-metricscrate out of thetorrust-trackerworkspace into its own standalone repository so that it can be maintained, versioned, and published independently of the tracker.Background
The
torrust-metricspackage provides Prometheus metrics integration types for the tracker. Its relevant internal dependency istorrust-clock, which is already published on crates.io. After thetorrust-tracker-metrics->torrust-metricsrename (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
torrust/torrust-metricsin the Torrust GitHub organization.packages/metrics/to the new repository, preserving git history (usinggit filter-repo).torrust-metricsas a crates.io version dependency instead of a path dependency (see list below).Cargo.tomlworkspace dep registration fortorrust-metrics.packages/metricsfrom the workspacememberslist in rootCargo.toml.packages/metrics/directory from the tracker repository.packages/AGENTS.md,AGENTS.md, anddocs/packages.md(movetorrust-metricsto the "Extracted" section).Out of Scope
Workspace consumers to migrate
The following 7 packages must have their
torrust-metricsdep 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.tomlAcceptance Criteria
torrust/torrust-metricsexists on GitHub.packages/metrics/.Cargo.tomlin the tracker workspace referencestorrust-metricswith a path dep.packages/metricsis absent from the[workspace]members list in rootCargo.toml.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.