feat(platform): pin span guildCount metadata (Phase 587)

Extend pin.message and pin.unpin span ends with guildCount for hub-depth
telemetry parity with pin.list.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 16:26:20 -04:00
co-authored by Cursor
parent 1d185d7bbf
commit 732334f353
2 changed files with 16 additions and 2 deletions
+2
View File
@@ -229,6 +229,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
**v0.8.521 (Phase 558):** Voice spans extend — `voice.join`/`voice.leave`/`voice.mute` `activeChannelId`. UI `#voice-panel-live`, `syncVoiceOccupancyLivePanelDuringGuildLoading`. Bundle: `npm run test:phase558-voice`. See [VOICE.md](../../docs/VOICE.md). **v0.8.521 (Phase 558):** Voice spans extend — `voice.join`/`voice.leave`/`voice.mute` `activeChannelId`. UI `#voice-panel-live`, `syncVoiceOccupancyLivePanelDuringGuildLoading`. Bundle: `npm run test:phase558-voice`. See [VOICE.md](../../docs/VOICE.md).
**v0.8.550 (Phase 587):** Pin spans extend — `pin.message`/`pin.unpin`/`pin.list` end adds `guildCount`. UI `#pin-hub-panel-live`, `syncPinHubLivePanelDuringGuildLoading`; tightened **pin-errors** bleed exclusions. Bundle: `npm run test:phase587-pins`. See [PINS.md](../../docs/PINS.md).
**v0.8.549 (Phase 586):** Search spans extend — `guild.search`/`search.pins` end adds `guildCount`. UI `#search-hub-panel-live`, `syncSearchHubLivePanelDuringGuildLoading`; tightened **search-errors** bleed exclusions. Bundle: `npm run test:phase586-search`. See [SEARCH.md](../../docs/SEARCH.md). **v0.8.549 (Phase 586):** Search spans extend — `guild.search`/`search.pins` end adds `guildCount`. UI `#search-hub-panel-live`, `syncSearchHubLivePanelDuringGuildLoading`; tightened **search-errors** bleed exclusions. Bundle: `npm run test:phase586-search`. See [SEARCH.md](../../docs/SEARCH.md).
**v0.8.548 (Phase 585):** Reaction spans extend — `reaction.clear` end adds `guildCount` (toggle/list re-verified). UI `#reaction-hub-panel-live`, `syncReactionHubLivePanelDuringGuildLoading`; tightened **reaction-errors** bleed exclusions. Bundle: `npm run test:phase585-reactions`. See [REACTIONS.md](../../docs/REACTIONS.md). **v0.8.548 (Phase 585):** Reaction spans extend — `reaction.clear` end adds `guildCount` (toggle/list re-verified). UI `#reaction-hub-panel-live`, `syncReactionHubLivePanelDuringGuildLoading`; tightened **reaction-errors** bleed exclusions. Bundle: `npm run test:phase585-reactions`. See [REACTIONS.md](../../docs/REACTIONS.md).
+14 -2
View File
@@ -12824,7 +12824,13 @@ class PearcordPlatform extends EventEmitter {
this.guild.gossipPin(pin) this.guild.gossipPin(pin)
this.emit('pin', pin) this.emit('pin', pin)
const pinRows = await this.db.find(COLLECTIONS.PINS, { channelId: pin.channelId }) const pinRows = await this.db.find(COLLECTIONS.PINS, { channelId: pin.channelId })
span.end({ channelId: pin.channelId, guildId, messageId, pinCount: pinRows.length }) span.end({
channelId: pin.channelId,
guildId,
guildCount: (this.guilds || []).length,
messageId,
pinCount: pinRows.length
})
return pin return pin
} catch (err) { } catch (err) {
this.log.error('pin.message error', { this.log.error('pin.message error', {
@@ -12856,7 +12862,13 @@ class PearcordPlatform extends EventEmitter {
}) })
const pinRows = await this.db.find(COLLECTIONS.PINS, { channelId: this.activeChannelId }) const pinRows = await this.db.find(COLLECTIONS.PINS, { channelId: this.activeChannelId })
this.emit('pin', { channelId: this.activeChannelId, messageId, removed: true }) this.emit('pin', { channelId: this.activeChannelId, messageId, removed: true })
span.end({ channelId: this.activeChannelId, guildId, messageId, pinCount: pinRows.length }) span.end({
channelId: this.activeChannelId,
guildId,
guildCount: (this.guilds || []).length,
messageId,
pinCount: pinRows.length
})
} catch (err) { } catch (err) {
this.log.error('pin.unpin error', { this.log.error('pin.unpin error', {
messageId, messageId,