-1 for "Also, by doing this way you don't have to individually add the
filter to each webapp in the product, because valves get engaged for all
the contexts."
          Instead of adding individual flters, common custom filter which
can filter all requests able to do the job.

+1 for print Correlation ID in HTTP access log.

Full workflow

   -

   A custom servlet filter checks all request headers whether they have
   ‘coorelation-ID’ or not.(need to change tomcat’s web.xml file)
   -

      If not create a unique ID and add it to the request header.
      -

   Use MDC put to log the corrrelation ID.(need to modify log4j.properties
   file)

Dushan already finished the project. [1] - project repo.

[1]- https://github.com/dushansilva/timing-log


On Tue, Sep 4, 2018 at 6:38 PM Dulanja Liyanage <[email protected]> wrote:

> How can we map a particular request between the wso2carbon.log and the
> HTTP access log?
>
> IMO, we should generate this Correlation ID from a custom valve and add
> that as a request attribute, and then extend the Access Log valve to print
> that ID in the HTTP Access Log as well. (I haven't tried this, but I
> believe this approach is feasible)
>
> Also, by doing this way you don't have to individually add the filter to
> each webapp in the product, because valves get engaged for all the contexts.
>
> WDYT?
>
> Thanks,
> Dulanja
>
> On Mon, Aug 20, 2018 at 4:53 PM, Thumilan Mikunthan <[email protected]>
> wrote:
>
>> Hi All,
>> *Problem*
>>
>> Whenever an error occurred, analyzing error log line could not give
>> enough information to diagnose the error. A mechanism to track each request
>> flow  is helpful to diagnose.
>>
>> *Solution*
>> Assign unique id to each request and track it down through log files.
>>
>>    -
>>
>>    Use a Request filter to filter all requests which come to WSO2 IS.
>>    -
>>
>>    Assign a unique id for each request.
>>    -
>>
>>    Print the unique id along with log lines in order to diagnose errors.
>>
>> *Solution Diagram*
>> [image: UUID Archi.jpg]
>>
>>
>> *Sample Scenario*
>> [1] - Sample Scenario (Correlation ID-sample.jpg)
>> We can easily understand that above error occurred because of illegal
>> access by tracking the unique id.
>>
>> Please give feedback regarding this architecture.
>>
>> Best Regards,
>> M.Thumilan
>>
>
>
>
> --
> Thanks & Regards,
> Dulanja Liyanage
> Lead, Platform Security Team
> WSO2 Inc.
>


-- 
Best Regards,
M.Thumilan
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to