Skip to content

Commit

Permalink
Expose count of legacy_principals in metrics (#5311)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Feb 2, 2024
1 parent 49b5c47 commit 1305930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/canisters/identity/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Implement ability to update user principals ([#5220](https://github.com/open-chat-labs/open-chat/pull/5220))
- Sync user principals from the UserIndex canister ([#5264](https://github.com/open-chat-labs/open-chat/pull/5264))
- Implement `migrate_legacy_principal` ([#5274](https://github.com/open-chat-labs/open-chat/pull/5274))
- Expose count of `legacy_principals` in metrics ([#5311](https://github.com/open-chat-labs/open-chat/pull/5311))
2 changes: 2 additions & 0 deletions backend/canisters/identity/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ impl RuntimeState {
cycles_balance: self.env.cycles_balance(),
wasm_version: WASM_VERSION.with_borrow(|v| **v),
git_commit_id: utils::git::git_commit_id().to_string(),
legacy_principals: self.data.legacy_principals.len() as u32,
canister_ids: CanisterIds {
user_index: self.data.user_index_canister_id,
cycles_dispenser: self.data.cycles_dispenser_canister_id,
Expand Down Expand Up @@ -114,6 +115,7 @@ pub struct Metrics {
pub cycles_balance: Cycles,
pub wasm_version: BuildVersion,
pub git_commit_id: String,
pub legacy_principals: u32,
pub canister_ids: CanisterIds,
}

Expand Down

0 comments on commit 1305930

Please sign in to comment.