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

Jason Gerlowski updated SOLR-8274:
----------------------------------
    Attachment: SOLR-8274.patch

I took a stab at adding a "requestId" MDC tag in RequestHandlerBase.

As patches go, this is about as straw-man as it gets.  I haven't made any 
attempt to share this request-tracker across threads, nor have I played around 
with pushing it down in to the actual Lucene code where the work of 
searching/indexing happens.  I just wanted to upload *anything* in case I'm 
doing something horribly wrong.

My next steps are to change my approach to mimic the handling of 'collection' 
and 'core' in MDCLoggingContext, to try and make the request-tracker cover more 
of Solr/Lucene's logs.  I also need to look into testing this logging change if 
I can.

It's taken me a week or so to make the little progress I have so far, but most 
of that was learning, so hopefully things'll go more smoothly in my next 
revision.

> Add per-request MDC logging based on user-provided value.
> ---------------------------------------------------------
>
>                 Key: SOLR-8274
>                 URL: https://issues.apache.org/jira/browse/SOLR-8274
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Jason Gerlowski
>            Priority: Minor
>         Attachments: SOLR-8274.patch
>
>
> *Problem 1* Currently, there's no way (AFAIK) to find all log messages 
> associated with a particular request.
> *Problem 2* There's also no easy way for multi-tenant Solr setups to find all 
> log messages associated with a particular customer/tenant.
> Both of these problems would be more manageable if Solr could be configured 
> to record an MDC tag based on a header, or some other user provided value.
> This would allow admins to group together logs about a single request.  If 
> the same header value is repeated multiple times this functionality could 
> also be used to group together arbitrary requests, such as those that come 
> from a particular user, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to