update: add status metrics for update progress#285
Closed
rslater-cs wants to merge 9 commits into
Closed
Conversation
rslater-cs
marked this pull request as draft
June 23, 2026 15:08
rslater-cs
force-pushed
the
update-status-metrics
branch
from
July 9, 2026 14:52
089663e to
774c280
Compare
- Added a "process" field to the component_update_lifecycle protocol in bigbox-v1-cm-2.json. - Updated main.lua to include profiling options for services. - Introduced new functions in metrics.lua for tracing component lifecycle metrics and logging HTTP payloads. - Enhanced HTTP publishing logic to handle metric chunks and added detailed logging for each chunk. - Improved component_watch.lua to trace component fact changes and report metrics. - Updated lifecycle_metrics.lua to sanitize job IDs in namespaces and log publishing actions. - Enhanced service.lua to trace component lifecycle metrics and handle job states more robustly. - Added unit tests to validate lifecycle metrics and ensure proper namespace formatting.
…fy HTTP payload handling
…eation assertions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
The update service did not output any metrics for updates to the cloud which is needed for mcu updates so we can track them during deployment.
I have added metrics lifescycle code for building a emitting metrics and added the nessarsary metric pipeline to the config file.
The update progress is currently published under
<component>/lifecycle/<job_id>/component_update_lifecyclewith the string value<state>where<state>can bestarted,staged,completed,failedorcancelled. The subtopic is<component>.lifecycle.<job_id>.<state>with string value<state>. The job id is normalised to replace-with_to keep compatibility with grafana.Manual test
Manual test description
I have ran devicecode to make sure no error arise
Added tests?
Added to documentation?