Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add http requrests profiler #5

Open
dadmin opened this Issue · 4 comments

3 participants

@dadmin

Hi... Is it possible to add HTTP profiling? It will be very useful for SOLR/Elasticsearch profiling

@tomdcc
Owner

Hi dadmin. Could you explain what sort of information you want profiled?

@dadmin

SOLR / Elasticsearch has REST API. Our service is based on SOLR. We have plain old DB but mostly we use SOLR. So we need tool that will give us more info about REST API comunication.

  1. What HTTP requests was made during the processing the request
  2. How long service (SOLR) was answering
  3. (optional) HTTP Request / Response data - url, params, headers, body

note:
I'm talking about debugging HTTP requests that my service do during processing my request

@tomdcc
Owner

Hi dadmin. In the next version of the plugin I plan to pull most of the functionality out into a core java library and just leave the grails-specific bits in the plugin. Then I would imagine that a SOLR-specific wrapper could be more easily developed.

In the meantime you could instrument your solr service by getting a handle on the current MiniProfiler object (inject the profilerProvider spring bean into the service and call getCurrentProfiler()) and then adding timings by calling the step() method. You can even add specific values to a timing - see the keyValues map on the Timing object. I presume that those get displayed in some sort of way by the javascript in the front end, but I haven't tried it myself.

I'm going to leave this open as a reminder to make some sort of http client profiling a feature of the split-out java code.

dadmin, which http client library are you using?

@fedotxxl

Hi. We are using httpClient (java version) or httpBuilder (groovy wrapper).
By the way pls check this suggestion - http://grails.1312388.n4.nabble.com/Let-s-create-one-more-plugin-together-tp4645756.html . I think your plugin perfectly suits this suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.