[
https://issues.apache.org/jira/browse/CAMEL-20796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Federico Mariani resolved CAMEL-20796.
--------------------------------------
Resolution: Information Provided
> trace rest-dsl definition
> -------------------------
>
> Key: CAMEL-20796
> URL: https://issues.apache.org/jira/browse/CAMEL-20796
> Project: Camel
> Issue Type: New Feature
> Affects Versions: 4.x
> Reporter: Federico Mariani
> Priority: Major
> Attachments: rest-dsl-tracing.zip
>
>
> When tracing is enabled, standard routes are logged as expected
> (from(..).to(..)) but rest-dsl definitions are not logged, the attached
> reproducer logs the following
> {code:java}
> 2024-05-22T16:42:18.384+02:00 INFO 13129 --- [nio-8080-exec-1]
> HttpServerRoute:32 : ---> [route1 ]
> [from[direct:pong] ] Exchange[Id:
> 6ADF719D5D3CC46-0000000000000000, Headers: {accept=*/*,
> CamelHttpCharacterEncoding=UTF-8, CamelHttpMethod=GET, CamelHttpPath=,
> CamelHttpQuery=null,
> CamelHttpServletRequest=org.apache.catalina.connector.RequestFacade@71116085,
> CamelHttpServletResponse=org.springframework.web.context.request.async.StandardServletAsyncWebRequest$LifecycleHttpServletResponse@14455acb,
> CamelHttpUri=/ping, CamelHttpUrl=http://localhost:8080/ping,
> CamelPlatformHttpContextPath=/ping, host=localhost:8080,
> user-agent=curl/8.6.0}, BodyType:
> org.apache.camel.converter.stream.InputStreamCache, Body: ]
> 2024-05-22T16:42:18.385+02:00 INFO 13129 --- [nio-8080-exec-1]
> HttpServerRoute:33 : [route1 ]
> [setBody[constant{pong}] ] Exchange[Id:
> 6ADF719D5D3CC46-0000000000000000, Headers: {accept=*/*,
> CamelHttpCharacterEncoding=UTF-8, CamelHttpMethod=GET, CamelHttpPath=,
> CamelHttpQuery=null,
> CamelHttpServletRequest=org.apache.catalina.connector.RequestFacade@71116085,
> CamelHttpServletResponse=org.springframework.web.context.request.async.StandardServletAsyncWebRequest$LifecycleHttpServletResponse@14455acb,
> CamelHttpUri=/ping, CamelHttpUrl=http://localhost:8080/ping,
> CamelPlatformHttpContextPath=/ping, host=localhost:8080,
> user-agent=curl/8.6.0}, BodyType:
> org.apache.camel.converter.stream.InputStreamCache, Body: ]
> 2024-05-22T16:42:18.386+02:00 INFO 13129 --- [nio-8080-exec-1]
> HttpServerRoute:32 : <--- [route1 ]
> [from[direct:pong] {code}
> It would be nice if the rest-dsl part (implemented via platform-http) could
> be logged too, as example:
> {code:java}
> ---> [route1 ] [from[platform-http:??] possibly log server host : port
> and path ]
> [route1 ] [direct:pong ]
> ---> [route2 ] [from[direct:pong] ]
> [route2 ] [setBody[constant{pong}] ]
> <--- [route2 ] [from[direct:pong] ]
> <--- [route1 ] [from[platform-http:??]{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)