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

Create FunctionConfig for Lake-of-Segments and move "static" info to it. #1017

Open
9 tasks
mscaldas2012 opened this issue May 31, 2023 · 1 comment · Fixed by #1051
Open
9 tasks

Create FunctionConfig for Lake-of-Segments and move "static" info to it. #1017

mscaldas2012 opened this issue May 31, 2023 · 1 comment · Fixed by #1051
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 Lake of Segments FN:

  • Move Reading Environment variables to Function Config.
  • Move eventHubSender to FunctionConfig
  • Load BasicProfile config on TransformerSegment init (and cache it in-memory)
  • Move TransformerSegment to FunctionConfig and init it there.

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
@guntukuhari guntukuhari linked a pull request Jun 7, 2023 that will close this issue
@guntukuhari
Copy link
Contributor

PR - #1051

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

Successfully merging a pull request may close this issue.

3 participants