Skip to content

feature: Add request duration in nanoseconds #3399

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sfozz
Copy link

@sfozz sfozz commented May 16, 2025

So that if you have other systems that record durations to this resolution then they can be in alignment without needing calculation.

Implements: #3398

@@ -287,7 +287,7 @@ def log(self, lvl, msg, *args, **kwargs):
lvl = self.LOG_LEVELS.get(lvl.lower(), logging.INFO)
self.error_log.log(lvl, msg, *args, **kwargs)

def atoms(self, resp, req, environ, request_time):
def atoms(self, resp, req, environ, request_time, request_time_nanoseconds):
Copy link
Contributor

Choose a reason for hiding this comment

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

overridden in some environments, thus adding new args is either a breaking change - or requires some annoying private superclass workaround to keep public signatures unchanged.

@sfozz sfozz force-pushed the nano_duration_access_log branch 6 times, most recently from 160adc4 to c94a100 Compare June 27, 2025 03:18
So that if you have other systems that record durations to this
resolution then they can be in alignment without needing calculation.
@sfozz sfozz force-pushed the nano_duration_access_log branch from c94a100 to 9a59cee Compare June 27, 2025 03:20
@sfozz sfozz requested a review from pajod June 27, 2025 03:24
@sfozz
Copy link
Author

sfozz commented Jun 27, 2025

I've cleaned this up and made the change more intentional.

  • Cleaned up the atoms so that the math is easier to follow
  • updated the tests to handle the change

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