Skip to content

Commit e74af8d

Browse files
authored
[Core] report syncing state metrics (#1766)
### **User description** # Description What - added publish to syncing state Why - to have better monitoring and visibility How - called publishing function ## Type of change Please leave one option from the following and delete the rest: - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] New Integration (non-breaking change which adds a new integration) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Non-breaking change (fix of existing functionality that will not change current behavior) - [ ] Documentation (added/updated documentation) <h4> All tests should be run against the port production environment(using a testing org). </h4> ### Core testing checklist - [ ] Integration able to create all default resources from scratch - [ ] Resync finishes successfully - [ ] Resync able to create entities - [ ] Resync able to update entities - [ ] Resync able to detect and delete entities - [ ] Scheduled resync able to abort existing resync and start a new one - [ ] Tested with at least 2 integrations from scratch - [ ] Tested with Kafka and Polling event listeners - [ ] Tested deletion of entities that don't pass the selector ___ ### **PR Type** Bug fix ___ ### **Description** • Fixed missing syncing state metrics reporting during resource processing ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>sync_raw.py</strong><dd><code>Add missing syncing metrics reporting call</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> port_ocean/core/integrations/mixins/sync_raw.py • Added call to <code>report_kind_sync_metrics()</code> after setting sync state to <br>SYNCING<br> • Ensures metrics are properly reported during resource <br>processing </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1766/files#diff-7087c0350a44c64c6ca1e4333b34e158b354bdd15932e51860efaddda535cddc">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about Qodo Merge usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details>
1 parent 824c30c commit e74af8d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
<!-- towncrier release notes start -->
9+
## 0.24.8 (2025-06-11)
10+
11+
### Bug Fixes
12+
- Fixed missing syncing state metrics reporting during resource processing
13+
14+
915
## 0.24.7 (2025-06-11)
1016

1117
### Bug Fixes

port_ocean/core/integrations/mixins/sync_raw.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ async def _process_resource(self,resource: ResourceConfig, index: int, user_agen
646646
async with resource_context(resource,index):
647647
resource_kind_id = f"{resource.kind}-{index}"
648648
ocean.metrics.sync_state = SyncState.SYNCING
649+
await ocean.metrics.report_kind_sync_metrics(kind=resource_kind_id, blueprint=resource.port.entity.mappings.blueprint)
649650

650651
task = asyncio.create_task(
651652
self._register_in_batches(resource, user_agent_type)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "port-ocean"
3-
version = "0.24.7"
3+
version = "0.24.8"
44
description = "Port Ocean is a CLI tool for managing your Port projects."
55
readme = "README.md"
66
homepage = "https://app.getport.io"

0 commit comments

Comments
 (0)