feat(reactions): add spanKind to reaction.toggle/gossip spans (Phase 521)
Tag reaction.toggle and reaction.gossip start/end with spanKind for diagnostics filtering and agentctl correlation. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -63,6 +63,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
|
|||||||
|
|
||||||
**v0.8.463 (Phase 500):** `message.send` `replyToId`; `message.edit` `deltaLength`; `message.delete` `hadReactions`/`reactionCount`. UI split messaging composer guild-loading compositor. Bundle: `npm run test:phase500-messaging`. See [MESSAGING.md](../../docs/MESSAGING.md).
|
**v0.8.463 (Phase 500):** `message.send` `replyToId`; `message.edit` `deltaLength`; `message.delete` `hadReactions`/`reactionCount`. UI split messaging composer guild-loading compositor. Bundle: `npm run test:phase500-messaging`. See [MESSAGING.md](../../docs/MESSAGING.md).
|
||||||
|
|
||||||
|
**v0.8.484 (Phase 521):** `reaction.toggle` and `reaction.gossip` spans include `spanKind` on start/end. UI extends reaction guild-loading compositor. Bundle: `npm run test:phase521-reactions`. See [REACTIONS.md](../../docs/REACTIONS.md).
|
||||||
|
|
||||||
**v0.8.464 (Phase 501):** `reaction.toggle` `added`/`hadMeBefore`/`gossipSent`; `reaction.gossip` span on mesh fanout. UI `syncReactionPanelsDuringGuildLoading`. Bundle: `npm run test:phase501-reactions`. See [REACTIONS.md](../../docs/REACTIONS.md).
|
**v0.8.464 (Phase 501):** `reaction.toggle` `added`/`hadMeBefore`/`gossipSent`; `reaction.gossip` span on mesh fanout. UI `syncReactionPanelsDuringGuildLoading`. Bundle: `npm run test:phase501-reactions`. See [REACTIONS.md](../../docs/REACTIONS.md).
|
||||||
|
|
||||||
**v0.8.465 (Phase 502):** `attachment.stage` `filenameLen`; `attachment.read` `attachmentId`/`isImage`; `embed.gossip` span; `embed.resolve` `gossipSent`. UI split attachment guild-loading compositor. Bundle: `npm run test:phase502-attachments`. See [ATTACHMENTS.md](../../docs/ATTACHMENTS.md), [EMBEDS.md](../../docs/EMBEDS.md).
|
**v0.8.465 (Phase 502):** `attachment.stage` `filenameLen`; `attachment.read` `attachmentId`/`isImage`; `embed.gossip` span; `embed.resolve` `gossipSent`. UI split attachment guild-loading compositor. Bundle: `npm run test:phase502-attachments`. See [ATTACHMENTS.md](../../docs/ATTACHMENTS.md), [EMBEDS.md](../../docs/EMBEDS.md).
|
||||||
|
|||||||
@@ -12355,6 +12355,7 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
const guildId = this.mode === 'dm' ? DM_GUILD_ID : this.guild?.guild?.id || null
|
const guildId = this.mode === 'dm' ? DM_GUILD_ID : this.guild?.guild?.id || null
|
||||||
const channelId = this.activeChannelId
|
const channelId = this.activeChannelId
|
||||||
const span = this.log.time('reaction.toggle', {
|
const span = this.log.time('reaction.toggle', {
|
||||||
|
spanKind: 'reaction.toggle',
|
||||||
messageId,
|
messageId,
|
||||||
emoji: String(emoji || '').slice(0, 16),
|
emoji: String(emoji || '').slice(0, 16),
|
||||||
guildId,
|
guildId,
|
||||||
@@ -12377,6 +12378,7 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
let gossipSent = false
|
let gossipSent = false
|
||||||
if (this.mode !== 'dm' && this.guild) {
|
if (this.mode !== 'dm' && this.guild) {
|
||||||
const gossipSpan = this.log.time('reaction.gossip', {
|
const gossipSpan = this.log.time('reaction.gossip', {
|
||||||
|
spanKind: 'reaction.gossip',
|
||||||
messageId,
|
messageId,
|
||||||
guildId,
|
guildId,
|
||||||
channelId,
|
channelId,
|
||||||
@@ -12384,9 +12386,11 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
})
|
})
|
||||||
this.guild.gossipReaction(result)
|
this.guild.gossipReaction(result)
|
||||||
gossipSpan.end({
|
gossipSpan.end({
|
||||||
|
spanKind: 'reaction.gossip',
|
||||||
removed: result?.removed === true,
|
removed: result?.removed === true,
|
||||||
guildId,
|
guildId,
|
||||||
channelId
|
channelId,
|
||||||
|
emoji: emojiKey
|
||||||
})
|
})
|
||||||
gossipSent = true
|
gossipSent = true
|
||||||
}
|
}
|
||||||
@@ -12396,6 +12400,7 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
(r) => r.messageId === messageId && r.emoji === emojiKey
|
(r) => r.messageId === messageId && r.emoji === emojiKey
|
||||||
).length
|
).length
|
||||||
span.end({
|
span.end({
|
||||||
|
spanKind: 'reaction.toggle',
|
||||||
messageId,
|
messageId,
|
||||||
emoji: emojiKey,
|
emoji: emojiKey,
|
||||||
emojiLength: emojiKey.length,
|
emojiLength: emojiKey.length,
|
||||||
|
|||||||
Reference in New Issue
Block a user