lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Wolanin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-232) let Solr set request headers (for logging)
Date Sun, 24 Apr 2011 16:29:05 GMT

    [ https://issues.apache.org/jira/browse/SOLR-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024649#comment-13024649
] 

Peter Wolanin commented on SOLR-232:
------------------------------------

Looks like the title needs to change?  From looking at the Solr 1.4 code, it seems this issue
is now about setting RESPONSE headers?

That's certainly the use case I have in mind, and what seems to be commented out in the Solr
1.4 code:
https://svn.apache.org/repos/asf/lucene/solr/branches/branch-1.4/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java

{code}
              // add info to http headers
              //TODO: See SOLR-232 and SOLR-267.  
                /*try {
                  NamedList solrRspHeader = solrRsp.getResponseHeader();
                 for (int i=0; i<solrRspHeader.size(); i++) {
                   ((javax.servlet.http.HttpServletResponse) response).addHeader(("Solr-"
+ solrRspHeader.getName(i)), String.valueOf(solrRspHeader.getVal(i)));
                 }
                } catch (ClassCastException cce) {
                  log.log(Level.WARNING, "exception adding response header log information",
cce);
                }*/
{code}

However, the things currently sent in the response header seem to be missing the # of matches
(logged as "hits"), and I'm not sure I'd want all the params sent back as headers by default.

So, maybe we need a method like solrRsp.getHttpResponseHeader(); instead of using solrRsp.getResponseHeader();
 and corresponding setters?


> let Solr set request headers (for logging)
> ------------------------------------------
>
>                 Key: SOLR-232
>                 URL: https://issues.apache.org/jira/browse/SOLR-232
>             Project: Solr
>          Issue Type: New Feature
>         Environment: tomcat?
>            Reporter: Ian Holsman
>            Priority: Minor
>         Attachments: meta.patch
>
>
> I need the ability to log certain information about a request so that I can feed it into
performance and capacity monitoring systems.
> I would like to know things like
> - how long the request took 
> - how many rows were fetched and returned
> - what handler was called.
> per request.
> the following patch is 1 way to implement this, I'm sure there are better ways.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message