Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify CallStack #241

Merged
merged 2 commits into from
Feb 10, 2024
Merged

Simplify CallStack #241

merged 2 commits into from
Feb 10, 2024

Conversation

confused-Techie
Copy link
Member

Requirements

  • Filling out the template is required.

  • All new code requires tests to ensure against regressions.

    • However, if your PR contains zero code changes, feel free to select the checkmark below to indicate so.
  • Have you ran tests against this code?

  • This PR contains zero code changes.

Description of the Change

This PR works to simplify CallStacks.

The CallStack is a custom object of the SSO object. The CallStack keeps tracks of all calls made at each step of the endpoint, retaining their information and logging it to allow easy investigation.

Previously every call in a callstack was added each time an SSO object was returned. But this PR creates a CallStack class, which allows a few improvements over the old method:

  • Each endpoint keeps track of a callStack variable, that can be added during SSO creation. Ensuring totally accurate stacks
  • The timing details of a CallStack entry are much more accurate, or at least closer to showing runtime between steps, which can help optimization in the future.
  • We are now able to add custom events into the callstack, such as the init event.
  • We are now able to easily sanitize the data being added to the callstack. Which currently is used to ensure sensitive data is never logged.

src/models/callStack.js Fixed Show fixed Hide fixed
src/models/callStack.js Fixed Show fixed Hide fixed
@confused-Techie confused-Techie merged commit fda9513 into main Feb 10, 2024
6 checks passed
@confused-Techie confused-Techie deleted the simplify-call-stack branch February 10, 2024 03:47
@confused-Techie confused-Techie mentioned this pull request Feb 11, 2024
2 tasks
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