4. Monitoring, Logging and Statistics

time

Measures the end-to-end processing time of the child interceptor flow and logs an aligned summary. If an OpenTelemetry parent Span is present on the {@link Exchange}, a child sub-span is created around the measured section so timing data is exported to OTel as well.

Example:


 <api port="2000">
   <time label="flow-timing">
        <setHeader name="foo" value="$.data.bar" language="jsonpath" />
   </time>
 </api>

Can be used in:

serviceProxy, api, global, chainDef, for, stompProxy, time, if, registration, wsStompReassembler, internal, interceptor, chain, bean, transport and soapProxy

Attributes

NameRequiredDefaultDescriptionExamples
label false - Optional label prefix for log lines. Use it to distinguish logs from multiple <time /> blocks.
"Validation"

Child Elements

ElementsDescriptionCardinality
request 0..*
response 0..*
rewriter 0..*
echo 0..*
abort 0..*

Other optional Child Elements

tcp, flowInitiator, replace, internalRouting, if, headerFilter, index, requireAuth, beautifier, exchangeStore, xml2Json, urlNormalizer, accessControl, adminApi, analyser, return, reverseProxying, userFeature, prometheus, jwtSign, httpClient, global, soapBody, apiDocs, time, choose, adminConsole, APIsJSON, clusterNotification, groovyTemplate, javascript, json2Xml, methodOverride, clamav, openTelemetry, openapiPublisher, authHead2Body, xmlContentFilter, logContext, destination, transform, oauth2Resource2, for, limit, setProperty, webSocket, log, balancer, jwtAuth, counter, wsaEndpointRewriter, xmlProtection, kubernetesValidation, acmeHttpChallenge, cache, ntlm, soapStackTraceFilter, login, jsonProtection, rest2Soap, statisticsCSV, cors, interceptor, graphQLProtection, throttle, static, accountRegistration, regExReplacer, http2xml, wsdlPublisher, setHeader, greaser, template, soap2Rest, accessLog, ruleMatching, rateLimiter, dispatching, xenAuthentication, testService, paddingHeader, setCookies, tokenValidator, oauth2authserver, groovy, apiKey, openapiValidator, soapOperationExtractor, wsdlRewriter, oauth2PermissionChecker, statisticsJDBC, webServiceExplorer, webServer, idempotency, validator, formValidation, statisticsProvider, chain, shadowing, sampleSoapService, wadlRewriter, basicAuthentication, shutdown, stompClient, call