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

Christine Poerschke commented on SOLR-15541:
--------------------------------------------

The new parameter could be called (say) {{logAllParamsOnError}} with some or 
all of the values below supported.

{code}
...&logAllParamsOnError=false # equivalent to existing behaviour

...&logAllParamsOnError=true # new opt-in behaviour

...&logAllParamsOnError=123,456 # log for status=123 and status=456 but not any 
other status codes

...&logAllParamsOnError=400,0 # log for status=400 and status=0 (technically 
status=0 is not an error, so this is slight misuse)

...&logAllParamsOnError=* # log for all status codes including status=0 (might 
be too complex to support this)
{code}

{{logAllParamsStatusCodes}} could be an alternative name if we wanted to make 
{{logAllParamsStatusCodes=400,0}} a legitimate use, noting that the difference 
between non-use of {{logParamsList}} and use of {{logAllParamsStatusCodes=0}} 
is the logging of non-original request parameters.

----

illustrative log extracts:

* without {{logParamsList}} use

{code}
# curl 
"http://localhost:8983/solr/gettingstarted/select?q=*:*&fl=id&opaqueRequestId=foobar&logAllParamsOnError=*";

2021-07-14 15:42:48.356 INFO  (qtp712627377-24) [c:gettingstarted s:shard2 
r:core_node7 x:gettingstarted_shard2_replica_n4] o.a.s.c.S.Request 
[gettingstarted_shard2_replica_n4]  webapp=/solr path=/select 
params={q=*:*&opaqueRequestId=foobar&fl=id&logAllParamsOnError=*} 
rid=localhost-5 hits=48 status=0 QTime=5 
allParams={q=*:*&opaqueRequestId=foobar&df=_text_&echoParams=explicit&fl=id&logAllParamsOnError=*&rows=10&rid=localhost-5}
{code}


* with {{logParamsList}} use

{code}
# curl 
"http://localhost:8983/solr/gettingstarted/select?q=*:*&fl=id&opaqueRequestId=barfoo&logAllParamsOnError=*&logParamsList=opaqueRequestId";

2021-07-14 15:44:51.488 INFO  (qtp712627377-82) [c:gettingstarted s:shard1 
r:core_node3 x:gettingstarted_shard1_replica_n1] o.a.s.c.S.Request 
[gettingstarted_shard1_replica_n1]  webapp=/solr path=/select 
params={opaqueRequestId=barfoo} rid=localhost-6 hits=48 status=0 QTime=13 
allParams={q=*:*&opaqueRequestId=barfoo&df=_text_&echoParams=explicit&fl=id&logAllParamsOnError=*&logParamsList=opaqueRequestId&rows=10&rid=localhost-6}
{code}

> opt-in support to INFO log all parameters on error
> --------------------------------------------------
>
>                 Key: SOLR-15541
>                 URL: https://issues.apache.org/jira/browse/SOLR-15541
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Christine Poerschke
>            Assignee: Christine Poerschke
>            Priority: Minor
>
> * The 
> [logParamsList|https://solr.apache.org/guide/8_9/common-query-parameters.html#logparamslist-parameter]
>  parameter (available from Solr 4.7 onwards via SOLR-5672) is useful if full 
> request logging on each of multiple shards is just 'too much' and/or if the 
> content being logged is to be redacted e.g. to only log opaque request 
> identifiers but not request details.
> ** A downside of reduced logging is that less detail is available when 
> investigating issues.
> * The 
> [echoParams|https://solr.apache.org/guide/8_9/common-query-parameters.html#echoparams-parameter]
>  parameter controls what information about request parameters is included in 
> the response header.
> ** With respect to investating of issues it's worth noting here that 
> {{echoParams=explicit}} is the default value and that routine use of 
> {{echoParams=all}} would return more details to the client but that details 
> of within-Solr requests e.g. requests using the {{group.distributed.first}} 
> and {{group.distributed.second}} [group 
> parameters|https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.9.0/solr/solrj/src/java/org/apache/solr/common/params/GroupParams.java#L60-L66]
>  would _not_ be captured.
> This ticket proposes to add a new parameter, called (say) 
> {{logAllParamsOnError}} whose use will result in all parameters being logged 
> on error, irrespective of the presence or value of the {{logParamsList}} 
> parameter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to