feat(platform): slash spanKind metadata for Phase 538

Add spanKind and activeChannelId to slash.register, slash.delete, and
slash.invoke span ends for integrations observability.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 12:35:32 -04:00
co-authored by Cursor
parent 612cb3662f
commit f1b210b1b7
2 changed files with 15 additions and 3 deletions
+2
View File
@@ -45,6 +45,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
**v0.8.452 (Phase 489):** `slash.register` `customCount`; `slash.delete` `deleted`; `slash.invoke` `replyLen`/`commandFound`. UI slash compositor + hints. Bundle: `npm run test:phase489-slash`. See [SLASH_COMMANDS.md](../../docs/SLASH_COMMANDS.md).
**v0.8.501 (Phase 538):** Slash spans extend — `slash.register`/`slash.delete`/`slash.invoke` end metadata (`spanKind`, `activeChannelId`). UI slash panel compositor wrappers, slash row `lastSlashRowId` + roving `tabindex`, clipboard slash busy flags. Bundle: `npm run test:phase538-slash`. See [SLASH_COMMANDS.md](../../docs/SLASH_COMMANDS.md).
**v0.8.500 (Phase 537):** Webhook spans extend — `webhook.create`/`webhook.delete`/`webhook.execute` end metadata (`spanKind`, `activeChannelId`). UI webhook panel compositor wrappers, webhook row `lastWebhookRowId` + roving `tabindex`, clipboard webhook busy flags. Bundle: `npm run test:phase537-webhooks`. See [WEBHOOKS.md](../../docs/WEBHOOKS.md).
**v0.8.451 (Phase 488):** `webhook.create` `channelType`/`hasAvatar`; `webhook.execute` `messageSent`. UI webhook compositor split + hints. Bundle: `npm run test:phase488-webhooks`. See [WEBHOOKS.md](../../docs/WEBHOOKS.md).
+13 -3
View File
@@ -8607,7 +8607,9 @@ class PearcordPlatform extends EventEmitter {
registered: rows.length,
guildId,
firstName: rows[0]?.name || null,
customCount: rows.filter((r) => !r.builtin).length
customCount: rows.filter((r) => !r.builtin).length,
spanKind: 'slash.register',
activeChannelId: this.activeChannelId
})
return rows
} catch (err) {
@@ -8643,7 +8645,13 @@ class PearcordPlatform extends EventEmitter {
meta: { name: removed.name }
})
this.emit('slash-command')
span.end({ name: removed.name, guildId, deleted: !!removed })
span.end({
name: removed.name,
guildId,
deleted: !!removed,
spanKind: 'slash.delete',
activeChannelId: this.activeChannelId
})
return removed
} catch (err) {
this.log.error('slash.delete error', {
@@ -11092,7 +11100,9 @@ class PearcordPlatform extends EventEmitter {
ephemeral: !!opts.ephemeral,
builtin: !!result.command?.builtin,
replyLen: reply.length,
commandFound: !!result.command
commandFound: !!result.command,
spanKind: 'slash.invoke',
activeChannelId: this.activeChannelId
})
return msg
} catch (err) {