You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ian Holsman (JIRA)" <ji...@apache.org> on 2007/05/10 08:36:15 UTC

[jira] Created: (SOLR-232) let Solr set request headers (for logging)

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


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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-232) let Solr set request headers (for logging)

Posted by "Ian Holsman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494918 ] 

Ian Holsman commented on SOLR-232:
----------------------------------

Hi Otis.

The UI would be a generic monitoring tool similar to http://pyro.holsman.net:8000/ganglia/?m=atomics_rows_mean&c=atomics.
and yes.. putting a error message would be much more helpful. The code was more to show how it could be done. there needs to be some more meta values added.


other uses I was planning on are:
- log file reply for performance testing
- top N queries
- top N errors
- capacity planning / finding poorly performing queries etc etc

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-232) let Solr set request headers (for logging)

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495077 ] 

Yonik Seeley commented on SOLR-232:
-----------------------------------

What's the effect of req.setAttribute() and how is it better/different from the logging Solr already does?

I don't even see the setAttribute method... is this Tomcat only, or am I looking in the wrong spot?

Also, rather than adding new methods to SolrQueryResponse, you might consider using SolrQueryRequest.getContext()

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-232) let Solr set request headers (for logging)

Posted by "Ian Holsman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Holsman updated SOLR-232:
-----------------------------

    Attachment: meta.patch

attachment more of a proof of concept/strawman to illustrate how i thought it might work

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-232) let Solr set request headers (for logging)

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494899 ] 

Otis Gospodnetic commented on SOLR-232:
---------------------------------------

Interesting.  Does it have a UI piece?  Do you need that "start" variable?  Looks like you could just use "i".  Keeping track of "ERR" is useful, but it may be more useful to keep track of the actual errors.  Maybe something as simple as e.getMessage()?


> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-232) let Solr set request headers (for logging)

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495084 ] 

Yonik Seeley commented on SOLR-232:
-----------------------------------

Ahh, I found setAttribute() (inherited from ServletRequest)

> 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.
-
You can reply to this email to add a comment to the issue online.