Skip to content

chore: database-based metrics to monitor processing engine#4383

Merged
lucaspin merged 3 commits into
mainfrom
chore/metrics
Apr 24, 2026
Merged

chore: database-based metrics to monitor processing engine#4383
lucaspin merged 3 commits into
mainfrom
chore/metrics

Conversation

@lucaspin

@lucaspin lucaspin commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

We need more visibility into the amount of events and executions the workers are handling. Here, we add three things:

  1. A generic db.rows.affected.count counter for DB operations. It uses table and operation (create | update | delete) as attributes, which allow us to slice things as we may need. This is mostly for overall insight into how much data we are handling. We use gorm callbacks for this.
  2. A workflow_events.pending.count gauge to check the number of current pending events. A high number here indicates degradation of the processing engine
  3. A workflow_node_executions.pending.count gauge to check the number of pending executions. Similar to [2], high number here indicates degradation.

Signed-off-by: Lucas Pinheiro <lucas@superplane.com>
@superplanehq-integration

Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

Comment thread pkg/telemetry/periodic.go
Comment thread pkg/telemetry/periodic_test.go
Signed-off-by: Lucas Pinheiro <lucas@superplane.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 237dfe0. Configure here.

Comment thread pkg/telemetry/periodic.go
Signed-off-by: Lucas Pinheiro <lucas@superplane.com>
@lucaspin lucaspin merged commit 9583491 into main Apr 24, 2026
5 checks passed
@lucaspin lucaspin deleted the chore/metrics branch April 24, 2026 22:15
WashingtonKK pushed a commit to WashingtonKK/superplane that referenced this pull request Apr 27, 2026
…ehq#4383)

We need more visibility into the amount of events and executions the
workers are handling. Here, we add three things:
1. A generic `db.rows.affected.count` counter for DB operations. It uses
table and operation (create | update | delete) as attributes, which
allow us to slice things as we may need. This is mostly for overall
insight into how much data we are handling. We use [gorm
callbacks](https://gorm.io/docs/write_plugins.html#Callbacks) for this.
2. A `workflow_events.pending.count` gauge to check the number of
current pending events. A high number here indicates degradation of the
processing engine
3. A `workflow_node_executions.pending.count` gauge to check the number
of pending executions. Similar to [2], high number here indicates
degradation.

---------

Signed-off-by: Lucas Pinheiro <lucas@superplane.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
re-pixel pushed a commit to re-pixel/superplane that referenced this pull request May 4, 2026
…ehq#4383)

We need more visibility into the amount of events and executions the
workers are handling. Here, we add three things:
1. A generic `db.rows.affected.count` counter for DB operations. It uses
table and operation (create | update | delete) as attributes, which
allow us to slice things as we may need. This is mostly for overall
insight into how much data we are handling. We use [gorm
callbacks](https://gorm.io/docs/write_plugins.html#Callbacks) for this.
2. A `workflow_events.pending.count` gauge to check the number of
current pending events. A high number here indicates degradation of the
processing engine
3. A `workflow_node_executions.pending.count` gauge to check the number
of pending executions. Similar to [2], high number here indicates
degradation.

---------

Signed-off-by: Lucas Pinheiro <lucas@superplane.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant