Skip to content

fix(FOUR-33645): guard activity execution time metric when ms timesta… - #9090

Open
gproly wants to merge 1 commit into
task/FOUR-32144from
bugfix/FOUR-33645
Open

gproly wants to merge 1 commit into
task/FOUR-32144from
bugfix/FOUR-33645

Conversation

@gproly

@gproly gproly commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

…mps are null

Prevent task completion failures when recording the Prometheus activity_execution_time_seconds histogram in BpmnSubscriber.

Fall back to created_at and completed_at when created_at_ms or completed_at_ms are unavailable, and skip the metric observation when either timestamp is still missing.

https://processmaker.atlassian.net/browse/FOUR-33645

ci:deploy

…mps are null

Prevent task completion failures when recording the Prometheus
activity_execution_time_seconds histogram in BpmnSubscriber.

Fall back to created_at and completed_at when created_at_ms or
completed_at_ms are unavailable, and skip the metric observation
when either timestamp is still missing.

https://processmaker.atlassian.net/browse/FOUR-33645
@cursor

cursor Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only change with defensive null handling on the activity-completed path; no auth, data, or workflow logic changes.

Overview
Hardens Prometheus activity duration recording in BpmnSubscriber::onActivityCompleted so task completion no longer fails when millisecond timestamps are absent.

Execution window now uses created_at_ms / completed_at_ms with fallback to created_at / completed_at. The activity_execution_time_seconds histogram is only observed when both start and end times are present; otherwise the metric is skipped and notifications/events proceed as before.

Reviewed by Cursor Bugbot for commit 499436d. Bugbot is set up for automated code reviews on this repo. Configure here.

@decisions-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-71a769fab7.engk8s.processmaker.net

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.

2 participants