refactor/tweak the params and implement correlation_id

This commit is contained in:
hongwei 2023-02-14 16:29:24 +01:00
parent 5af02e5359
commit f2395e99ed
2 changed files with 6 additions and 6 deletions

View File

@ -401,13 +401,11 @@ trait APIMethods510 {
|
|11 correlation_id (if null ignore)
|
|12 duration (if null ignore) non digit chars will be silently omitted
|12 include_app_names (if null ignore).eg: &include_app_names=API-EXPLORER,API-Manager,SOFI,null
|
|13 include_app_names (if null ignore).eg: &include_app_names=API-EXPLORER,API-Manager,SOFI,null
|13 include_url_patterns (if null ignore).you can design you own SQL LIKE pattern. eg: &include_url_patterns=%management/metrics%,%management/aggregate-metrics%
|
|14 include_url_patterns (if null ignore).you can design you own SQL LIKE pattern. eg: &include_url_patterns=%management/metrics%,%management/aggregate-metrics%
|
|15 include_implemented_by_partial_functions (if null ignore).eg: &include_implemented_by_partial_functions=getMetrics,getConnectorMetrics,getAggregateMetrics
|14 include_implemented_by_partial_functions (if null ignore).eg: &include_implemented_by_partial_functions=getMetrics,getConnectorMetrics,getAggregateMetrics
|
|${authenticationRequiredMessage(true)}
|

View File

@ -316,6 +316,7 @@ object MappedMetrics extends APIMetrics with MdcLoggable{
AND (${trueOrFalse(verb.isEmpty)} or verb = ${verb.getOrElse("")})
AND (${falseOrTrue(anon.isDefined && anon.equals(Some(true)))} or userid = 'null')
AND (${falseOrTrue(anon.isDefined && anon.equals(Some(false)))} or userid != 'null')
AND (${trueOrFalse(correlationId.isEmpty)} or correlationId = ${correlationId.getOrElse("")})
AND (${trueOrFalse(includeUrlPatterns.isEmpty) } or (url LIKE ($includeUrlPatternsQueriesSql)))
AND (${trueOrFalse(includeAppNames.isEmpty) } or (appname in ($includeAppNamesList)))
AND (${trueOrFalse(includeImplementedByPartialFunctions.isEmpty) } or implementedbypartialfunction in ($includeImplementedByPartialFunctionsList))
@ -333,7 +334,8 @@ object MappedMetrics extends APIMetrics with MdcLoggable{
AND (${trueOrFalse(appName.isEmpty)} or appname = ${appName.getOrElse("")})
AND (${trueOrFalse(verb.isEmpty)} or verb = ${verb.getOrElse("")})
AND (${falseOrTrue(anon.isDefined && anon.equals(Some(true)))} or userid = 'null')
AND (${falseOrTrue(anon.isDefined && anon.equals(Some(false)))} or userid != 'null')
AND (${falseOrTrue(anon.isDefined && anon.equals(Some(false)))} or userid != 'null')
AND (${trueOrFalse(correlationId.isEmpty)} or correlationId = ${correlationId.getOrElse("")})
AND (${trueOrFalse(excludeUrlPatterns.isEmpty) } or (url NOT LIKE ($excludeUrlPatternsQueries)))
AND (${trueOrFalse(excludeAppNames.isEmpty) } or appname not in ($excludeAppNamesList))
AND (${trueOrFalse(excludeImplementedByPartialFunctions.isEmpty) } or implementedbypartialfunction not in ($excludeImplementedByPartialFunctionsList))