Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Create FunctionConfig class for Structure-Validator and move "static" info to it. #1016

Open
8 tasks
mscaldas2012 opened this issue May 31, 2023 · 0 comments
Open
8 tasks
Assignees
Labels
CASE Case related tickets enhancement New feature or request LAB Lab related tickets

Comments

@mscaldas2012
Copy link
Collaborator

For performance purposes, our AZ Functions are set to be Always ON.
Because of that, we can initiate and cache some things at the class level so that we don't have to perform those operations every time the FN is invoked.

Create a FunctionConfig class that initializes environment variables and static config files.
Instantiate the FunctionConfig at the class level on the AZ Function class.

For Structure Validator:

  • Move Reading Environment variables to Function Config.
  • Move eventHubSender to FunctionConfig
  • Move getEhDestinations to FunctionConfig (that holds the event hub names, and stop passing those names as params)

Other refactoring:

  • Move val startTime = Date().toIsoString() to inside the messages.forEach loop
  • Enhance Logging (See Receiver/Debatcher for template)
    • prefix every logging with "DEX::
    • Log receiving message, sending message and any error (catches should have a logging)
    • Do not include entire message on logs (PII issues). Keep logs short.
@mscaldas2012 mscaldas2012 added CASE Case related tickets enhancement New feature or request LAB Lab related tickets labels May 31, 2023
@guntukuhari guntukuhari self-assigned this Jun 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CASE Case related tickets enhancement New feature or request LAB Lab related tickets
Projects
None yet
Development

No branches or pull requests

2 participants