You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Jason Gerlowski (Jira)" <ji...@apache.org> on 2023/07/06 16:13:00 UTC

[jira] [Resolved] (SOLR-15753) v2 calls should log params similar to current HttpSolrCall

     [ https://issues.apache.org/jira/browse/SOLR-15753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Gerlowski resolved SOLR-15753.
------------------------------------
    Fix Version/s: main (10.0)
                   9.3
         Assignee: Jason Gerlowski
       Resolution: Fixed

bq. I currently can't tell the difference in the v2 logging between a GET [...] and a POST

Just seeing this comment now, but we've addressed this in the fix for this ticket, luckily!  V2 request logging includes the HTTP "method" and request body - both of which haven't been included in our v1 request logging historically.

Some notes on the v2 request logging:
* obeys the slightly-hidden `logParamsList` feature supported by v1 APIs (but only for query parameters - cannot be used to filter request-body parameters)
* works with "slow request" logging settings 
* reuses the HttpSolrCall, SolrCore.Request, and SolrCore.SlowRequest loggers for consistency and compatibility with existing dashboards
* the "path" referenced in the request log is the full path for the request (with some templating applied), rather than just the request handler name (e.g. "/collections/{collectionName}/schema/name" vs "/schema")

Some examples of the v2 request logging:

{code}
o.a.s.s.HttpSolrCall method=POST path=/collections query-params={} entity={  "name":"test2",  "numShards":1} status=0 QTime=4540
o.a.s.s.HttpSolrCall method=GET path=/collections query-params={} entity={} status=0 QTime=1
o.a.s.c.S.Request method=GET path=/{a:cores|collections}/{collectionName}/schema/name query-params={fl=id&fq=id:asdf&fq=id:fdsa} entity={} status=0 QTime=1
{code}

I've merged and backported the fix this morning so it can make the cut for 9.3 and we can start gathering feedback and iterating.

> v2 calls should log params similar to current HttpSolrCall
> ----------------------------------------------------------
>
>                 Key: SOLR-15753
>                 URL: https://issues.apache.org/jira/browse/SOLR-15753
>             Project: Solr
>          Issue Type: Improvement
>          Components: v2 API
>            Reporter: Jason Gerlowski
>            Assignee: Jason Gerlowski
>            Priority: Major
>              Labels: V2
>             Fix For: main (10.0), 9.3
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently, v1 API requests are logged out at INFO level in HttpSolrCall, complete with all their API parameters. This logging is invaluable for a variety of use cases (query gathering, perf analysis, etc.)
> We should ensure that the v2 API offers similar logging if possible.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org