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

Track request queue time based on available request headers #34

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

Conversation

AxelTheGerman
Copy link

Hi,

I've been using the gem for a while and I added a way to parse common queue time headers.

It's been very useful to determine queue time of requests on the proxy level (before reaching the application) as it is a common source for performance issues.

Let me know if you'd be interested in accepting this change at all and I'm happy to refactor if needed.

@alexisbernard
Copy link
Member

Thanks for taking time to write the PR. I really appreciate.

It should report the queue time with a section. Thus it is automatically displayed in the web interface :

def report_queue_time
  if queue_time = calculate_queue_time(env)
    section = Section.new
    section.stop
    section.total_ms = queue_time
    section.gc_time_ms = 0
    section.file = "request-queue"
    section.line = 0
    section.kind = "queue"
    RorVsWild.agent.add_section(section)
  end
end

@AxelTheGerman
Copy link
Author

Thank you for the immediate response and the suggestion! I didn't know too much how sections work but that makes sense.

Will update the PR shortly :)

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