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

Adding new Event to track when a request is complete #1601

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

jwoertink
Copy link
Member

Purpose

Ref: luckyframework/breeze#33

Description

This PR adds in a new Pulsar event that will allow Breeze to subscribe and get the request duration. I've also refactored the LogHandler a little to clean up some of the logic with skipping logging.

With that, the time that was logged before included the time it took to print to the logs that a request was starting. That time is irrelevant though. By moving that up, we can just use Time.measure which will measure how long it takes to run the rest of the middleware stack. In a future PR, I'll be adding in a unique request ID that will be tracked in here so we can join the before/after logging

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

@jwoertink jwoertink merged commit e982370 into master Nov 1, 2021
@jwoertink jwoertink deleted the use_pulsar_for_request_times branch November 1, 2021 19:09
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.

2 participants