All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elasticsearch.index.request.ftl Maven / Gradle / Ivy

There is a newer version: 3.2.2
Show newest version
<@compress single_line=true>
{
  "type": "request",
  "date" : "${date}"
  ,"_id" : "${metrics.getRequestId()}"
  ,"gateway":"${gateway}"
  ,"@timestamp":"${@timestamp}"
  ,"transaction":"${metrics.getTransactionId()}"
  ,"method":${metrics.getHttpMethod().code()?c}
  ,"uri":"${metrics.getUri()}"
  ,"status":${metrics.getStatus()}
  ,"response-time":${metrics.getProxyResponseTimeMs()}
  <#if apiResponseTime??>
    ,"api-response-time":${apiResponseTime}
  
  <#if proxyLatency??>
  ,"proxy-latency":${proxyLatency}
  
  <#if requestContentLength??>
  ,"request-content-length":${requestContentLength}
  
  <#if responseContentLength??>
  ,"response-content-length":${responseContentLength}
  
  <#if metrics.getPlan()??>
  ,"plan":"${metrics.getPlan()}"
  
  <#if metrics.getApi()??>
  ,"api":"${metrics.getApi()}"
  
  <#if metrics.getApplication()??>
  ,"application":"${metrics.getApplication()}"
  
  ,"local-address":"${metrics.getLocalAddress()}"
  ,"remote-address":"${metrics.getRemoteAddress()}"
  <#if metrics.getEndpoint()??>
  ,"endpoint":"${metrics.getEndpoint()}"
  
  <#if metrics.getTenant()??>
  ,"tenant":"${metrics.getTenant()}"
  
  <#if metrics.getMessage()??>
  ,"message":"${metrics.getMessage()?j_string}"
  
  <#if metrics.getPath()??>
  ,"path":"${metrics.getPath()}"
  
  <#if metrics.getMappedPath()??>
  ,"mapped-path":"${metrics.getMappedPath()}"
  
  <#if metrics.getHost()??>
  ,"host":"${metrics.getHost()}"
  
  <#if metrics.getUserAgent()??>
  ,"user-agent":"${metrics.getUserAgent()?j_string}"
  <#else>
  ,"user-agent":""
  
  <#if metrics.getUser()??>
  ,"user":"${metrics.getUser()}"
  
  <#if metrics.getSecurityType()??>
  ,"security-type":"${metrics.getSecurityType()}"
  
  <#if metrics.getSecurityToken()??>
  ,"security-token":"${metrics.getSecurityToken()}"
  
  <#if metrics.getErrorKey()??>
  ,"error-key":"${metrics.getErrorKey()}"
  
  <#if metrics.getSubscription()??>
  ,"subscription":"${metrics.getSubscription()}"
  
  <#if metrics.getCustomMetrics()??>
    ,"custom": {
    <#list metrics.getCustomMetrics() as propKey, propValue>
      "${propKey}":"${propValue}"<#sep>,
    
    }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy