-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74262/#review225160
-----------------------------------------------------------


Ship it!




Ship It!

- Ramesh Mani


On Feb. 6, 2023, 4:51 a.m., Ramachandran Krishnan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74262/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2023, 4:51 a.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Kirby Zhou, Abhay Kulkarni, 
> Madhan Neethiraj, Mehul Parikh, Nikhil P, Pradeep Agrawal, Ramesh Mani, 
> Selvamohan Neethiraj, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan 
> Periasamy.
> 
> 
> Bugs: RANGER-4024
>     https://issues.apache.org/jira/browse/RANGER-4024
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> In Ranger, we do not have the correlation Id which needs to be stored in the 
> logs whenever we get the requestId header from the caller microservice 
> Proposal:
> RangerMDCFilter will capture the  correlation Id which needs to be stored in 
> the logs whenever we get the requestId header from the caller microservice 
> We can change logging ConversionPattern if needed to log requestId in the logs
> 
> using the %X{} placeholder for each entry contained in the MDC we want to be 
> logged:
> 
> Example:
> 
>   <appender name="xa_log_appender" 
> class="ch.qos.logback.core.rolling.RollingFileAppender">
>     <!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender-->
>     <!--and 
> http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy-->
>     <!--for further documentation-->
>     <file>${logdir}/ranger-admin-${hostname}-${user}.log</file>
>     <append>true</append>
>     <encoder>
>       <pattern>%date [%thread] %level{5} [%file:%line] 
> [requestId=%X{REQUEST_ID}] %msg%n</pattern>
>     </encoder>
>     <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
>       
> <fileNamePattern>${logdir}/ranger-admin-${hostname}-${user}.log.%d{yyyy-MM-dd}</fileNamePattern>
>       <maxHistory>15</maxHistory>
>       <cleanHistoryOnStart>true</cleanHistoryOnStart>
>     </rollingPolicy>
>   </appender>
> 
> 
> Diffs
> -----
> 
>   
> security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerMDCFilter.java
>  PRE-CREATION 
>   security-admin/src/main/resources/conf.dist/security-applicationContext.xml 
> 0af7ec2ff 
>   
> security-admin/src/test/java/org/apache/ranger/security/web/filter/TestRangerMDCFilter.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/74262/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ramachandran Krishnan
> 
>

Reply via email to