From 7206dea2d68b28005c73043ef94cfcfc49c8ad79 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 12 Mar 2026 13:51:29 -0700 Subject: [PATCH] chore: add Sentry breadcrumbs to subgraph proxy widget operations (#8996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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) --- src/core/graph/subgraph/promotionUtils.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/core/graph/subgraph/promotionUtils.ts b/src/core/graph/subgraph/promotionUtils.ts index 6a93f9c182..19a2c89b8d 100644 --- a/src/core/graph/subgraph/promotionUtils.ts +++ b/src/core/graph/subgraph/promotionUtils.ts @@ -1,3 +1,4 @@ +import * as Sentry from '@sentry/vue' import { isPromotedWidgetView } from '@/core/graph/subgraph/promotedWidgetTypes' import { t } from '@/i18n' import type { @@ -57,6 +58,11 @@ export function promoteWidget( for (const parent of parents) { 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( @@ -72,6 +78,11 @@ export function demoteWidget( for (const parent of parents) { 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[] { @@ -304,4 +315,9 @@ export function pruneDisconnected(subgraphNode: SubgraphNode) { } 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' + }) }