feat(platform): extend moderation/automod span metadata for Phase 572

Add guildCount to ban.member, kick.member, timeout.member, and automod.setConfig
span ends for moderation depth observability.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 15:17:53 -04:00
co-authored by Cursor
parent 0dc7e72059
commit 69c4b661f7
2 changed files with 10 additions and 4 deletions
+2
View File
@@ -181,6 +181,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
**v0.8.419 (Phase 456):** `session.startup` span ends with `guildCount` + `guildId`; `session.startup error` log. `identity.register` span + `identity.register error`. `guild.open` span end includes `guildId`. `loadGuild` / `createGuild` bust search cache and clear `_lastSearchFromCache`. Bundle: `npm run test:phase456-onboarding-session`. See [SESSION.md](../../docs/SESSION.md). **v0.8.419 (Phase 456):** `session.startup` span ends with `guildCount` + `guildId`; `session.startup error` log. `identity.register` span + `identity.register error`. `guild.open` span end includes `guildId`. `loadGuild` / `createGuild` bust search cache and clear `_lastSearchFromCache`. Bundle: `npm run test:phase456-onboarding-session`. See [SESSION.md](../../docs/SESSION.md).
**v0.8.535 (Phase 572):** Moderation spans extend — `guildCount` on `ban.member`/`kick.member`/`timeout.member`/`automod.setConfig`. UI `#moderation-hub-panel-live` + `syncModerationHubLivePanelDuringGuildLoading`; **moderation-errors** excludes role/permission/session/automod/audit bleed; clipboard `moderationHubPanelLiveBusy`/`moderationKickChromeBusy`/`channelModerationBanCount`. Bundle: `npm run test:phase572-moderation`. See [MODERATION.md](../../docs/MODERATION.md).
**v0.8.534 (Phase 571):** Role spans extend — `guildCount` on `role.create`/`role.delete`/`role.reorder`; `role.member` `spanKind`/`activeChannelId`/`assignedRoleCount`/`customRoleCount`. UI `#roles-hub-panel-live` + `syncRolesHubLivePanelDuringGuildLoading`; **role-errors** excludes permission bleed; clipboard `rolesHubPanelLiveBusy`/`rolesReorderChromeBusy`/`channelCustomRoleCount`. Bundle: `npm run test:phase571-roles`. See [ROLES.md](../../docs/ROLES.md). **v0.8.534 (Phase 571):** Role spans extend — `guildCount` on `role.create`/`role.delete`/`role.reorder`; `role.member` `spanKind`/`activeChannelId`/`assignedRoleCount`/`customRoleCount`. UI `#roles-hub-panel-live` + `syncRolesHubLivePanelDuringGuildLoading`; **role-errors** excludes permission bleed; clipboard `rolesHubPanelLiveBusy`/`rolesReorderChromeBusy`/`channelCustomRoleCount`. Bundle: `npm run test:phase571-roles`. See [ROLES.md](../../docs/ROLES.md).
**v0.8.533 (Phase 570):** Permission spans extend — `role.update`/`permission.overwrite`/`permission.eval` `guildCount`; `permission.eval` `spanKind`/`activeChannelId`. UI `#permissions-panel-live` + `syncPermissionsLivePanelDuringGuildLoading`; **permission-errors**/**role-errors** exclude session/settings/invite bleed; clipboard `permissionsPanelLiveBusy`/`permissionsRoleChromeBusy`/`channelPermissionOverwriteCount`. Bundle: `npm run test:phase570-permissions`. See [PERMISSIONS.md](../../docs/PERMISSIONS.md). **v0.8.533 (Phase 570):** Permission spans extend — `role.update`/`permission.overwrite`/`permission.eval` `guildCount`; `permission.eval` `spanKind`/`activeChannelId`. UI `#permissions-panel-live` + `syncPermissionsLivePanelDuringGuildLoading`; **permission-errors**/**role-errors** exclude session/settings/invite bleed; clipboard `permissionsPanelLiveBusy`/`permissionsRoleChromeBusy`/`channelPermissionOverwriteCount`. Bundle: `npm run test:phase570-permissions`. See [PERMISSIONS.md](../../docs/PERMISSIONS.md).
+8 -4
View File
@@ -8499,7 +8499,8 @@ class PearcordPlatform extends EventEmitter {
durationMs: Number(durationMinutes) > 0 ? Number(durationMinutes) * 60000 : 0, durationMs: Number(durationMinutes) > 0 ? Number(durationMinutes) * 60000 : 0,
spanKind: 'timeout.member', spanKind: 'timeout.member',
activeChannelId: this.activeChannelId, activeChannelId: this.activeChannelId,
activeTimeoutCount: activeTimeouts.length activeTimeoutCount: activeTimeouts.length,
guildCount: (this.guilds || []).length
}) })
return row return row
} catch (err) { } catch (err) {
@@ -10123,7 +10124,8 @@ class PearcordPlatform extends EventEmitter {
blockInvites: config.blockInvites !== false, blockInvites: config.blockInvites !== false,
maxMentions: config.maxMentions ?? null, maxMentions: config.maxMentions ?? null,
spanKind: 'automod.setConfig', spanKind: 'automod.setConfig',
activeChannelId: this.activeChannelId activeChannelId: this.activeChannelId,
guildCount: (this.guilds || []).length
}) })
return config return config
} catch (err) { } catch (err) {
@@ -12802,7 +12804,8 @@ class PearcordPlatform extends EventEmitter {
removedMember: true, removedMember: true,
spanKind: 'kick.member', spanKind: 'kick.member',
activeChannelId: this.activeChannelId, activeChannelId: this.activeChannelId,
memberCount memberCount,
guildCount: (this.guilds || []).length
}) })
return payload return payload
} catch (err) { } catch (err) {
@@ -12853,7 +12856,8 @@ class PearcordPlatform extends EventEmitter {
banCount: banRows.length, banCount: banRows.length,
removedMember: true, removedMember: true,
spanKind: 'ban.member', spanKind: 'ban.member',
activeChannelId: this.activeChannelId activeChannelId: this.activeChannelId,
guildCount: (this.guilds || []).length
}) })
return ban return ban
} catch (err) { } catch (err) {