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

Handle request-start header in microseconds and nanoseconds #157

Merged
merged 2 commits into from Mar 14, 2023

Conversation

adamlogic
Copy link
Collaborator

Not entirely sure wither Render uses microseconds or nanoseconds, so we'll handle both.

@adamlogic adamlogic merged commit 6c91e1d into main Mar 14, 2023
51 checks passed
@adamlogic adamlogic deleted the fix-render-queue-time branch March 14, 2023 14:02
Copy link
Member

@jon-sully jon-sully left a comment

Choose a reason for hiding this comment

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

I like the cutoff hierarchy — elegant solution 👍

@@ -20,15 +24,23 @@ def started_at
if @request_start_header
# There are several variants of this header. We handle these:
# - whole milliseconds (Heroku)
# - whole microseconds (???)
Copy link
Member

Choose a reason for hiding this comment

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

Lol what?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prior to this PR, my code comment said "nanoseconds", but my implementation handled "microseconds". I'm not even sure which one Render uses. I can't find it documented anywhere.

Copy link
Member

Choose a reason for hiding this comment

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

Well dang.

image

But I think we're well within safe constraints. Interesting they don't mention it anywhere though. Maybe they don't anticipate people using that header

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.

None yet

2 participants