mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 17:52:16 +00:00
chore: add Sentry breadcrumbs to subgraph proxy widget operations (#8996)
## Summary Add Sentry breadcrumbs to subgraph proxy widget operations for better observability of widget state changes. ## Changes - **What**: Add `Sentry.addBreadcrumb()` calls with category `'subgraph'` to `promoteWidget`, `demoteWidget`, and `pruneDisconnected` in `proxyWidgetUtils.ts` ## Review Focus Breadcrumbs are info-level and don't affect control flow. They log widget name/node ID for promote/demote and removed count for prune. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8996-chore-add-Sentry-breadcrumbs-to-subgraph-proxy-widget-operations-30d6d73d365081a5abbccabd39fc7129) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import * as Sentry from '@sentry/vue'
|
||||||
import { isPromotedWidgetView } from '@/core/graph/subgraph/promotedWidgetTypes'
|
import { isPromotedWidgetView } from '@/core/graph/subgraph/promotedWidgetTypes'
|
||||||
import { t } from '@/i18n'
|
import { t } from '@/i18n'
|
||||||
import type {
|
import type {
|
||||||
@@ -57,6 +58,11 @@ export function promoteWidget(
|
|||||||
for (const parent of parents) {
|
for (const parent of parents) {
|
||||||
store.promote(parent.rootGraph.id, parent.id, nodeId, widgetName)
|
store.promote(parent.rootGraph.id, parent.id, nodeId, widgetName)
|
||||||
}
|
}
|
||||||
|
Sentry.addBreadcrumb({
|
||||||
|
category: 'subgraph',
|
||||||
|
message: `Promoted widget "${widgetName}" on node ${node.id}`,
|
||||||
|
level: 'info'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function demoteWidget(
|
export function demoteWidget(
|
||||||
@@ -72,6 +78,11 @@ export function demoteWidget(
|
|||||||
for (const parent of parents) {
|
for (const parent of parents) {
|
||||||
store.demote(parent.rootGraph.id, parent.id, nodeId, widgetName)
|
store.demote(parent.rootGraph.id, parent.id, nodeId, widgetName)
|
||||||
}
|
}
|
||||||
|
Sentry.addBreadcrumb({
|
||||||
|
category: 'subgraph',
|
||||||
|
message: `Demoted widget "${widgetName}" on node ${node.id}`,
|
||||||
|
level: 'info'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getParentNodes(): SubgraphNode[] {
|
function getParentNodes(): SubgraphNode[] {
|
||||||
@@ -304,4 +315,9 @@ export function pruneDisconnected(subgraphNode: SubgraphNode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
store.setPromotions(subgraphNode.rootGraph.id, subgraphNode.id, validEntries)
|
store.setPromotions(subgraphNode.rootGraph.id, subgraphNode.id, validEntries)
|
||||||
|
Sentry.addBreadcrumb({
|
||||||
|
category: 'subgraph',
|
||||||
|
message: `Pruned ${removedEntries.length} disconnected promotion(s) from subgraph node ${subgraphNode.id}`,
|
||||||
|
level: 'info'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user