Skip to content

Feature/ccm 17116 metrics#329

Open
nhsd-angel-pastor wants to merge 2 commits intomainfrom
feature/CCM-17116_metrics
Open

Feature/ccm 17116 metrics#329
nhsd-angel-pastor wants to merge 2 commits intomainfrom
feature/CCM-17116_metrics

Conversation

@nhsd-angel-pastor
Copy link
Copy Markdown
Contributor

@nhsd-angel-pastor nhsd-angel-pastor commented May 7, 2026

Description

To summarise, the changes are:

  • Updated the event publisher in typescript and in python to record the events published as a metric (see Confluence for the list of metrics )

  • As the event publisher now publishes metrics, it needs the dimension environment, so adding in the configuration of all the lambdas the environment name
    -- Lifted the metric-handler from comms-mgr

  • Consolidated existing metrics namespaces into the DL metrics namespace
    left as an environment variable the DL_METRICS_NAMESPACE in case we want to have a different namespace, e.g. Digital Letters/MESH, Digital Letters/PDM

  • Kept as it was the existing metrics with configurable name.

See comment for the tests evidences.

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@nhsd-angel-pastor nhsd-angel-pastor force-pushed the feature/CCM-17116_metrics branch 2 times, most recently from b285fb8 to af7676d Compare May 7, 2026 13:30
…r lambdas and in python

CCM-17116: Updating dependency for the events publisher in the nodejs lambdas

CCM-17116: replacing console.log as its wrapped by winston

CCM-17116: Adding metric for total senders

CCM-17116: Rename mesh metrics

CCM-17116: Updated event_publisher to include the status when recording metrics

CCM-17116: Updated metrics when recording events where the status can be different between events published
@nhsd-angel-pastor nhsd-angel-pastor force-pushed the feature/CCM-17116_metrics branch from af7676d to 75df6cf Compare May 7, 2026 13:58
ContinuationToken=continuation_token
)

def list_messages(self, max_results: Optional[int] = None, workflow_filter: Optional[str] = None) -> List[str]:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

self.__log.info('Polling for messages')

# Record how many messages are in the mailbox
remaining_messages = self.__mesh_client.list_messages()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

using list_messages method instead of iterate_all_messages because as per documentation the iterate is slower (see https://github.com/NHSDigital/mesh-client/blob/3.2.3/mesh_client/__init__.py#L839)

@nhsd-angel-pastor nhsd-angel-pastor marked this pull request as ready for review May 8, 2026 08:53
@nhsd-angel-pastor nhsd-angel-pastor requested review from a team as code owners May 8, 2026 08:53
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