简体   繁体   中英

Spring boot 2x actuator http trace not tracing body

i have enabled management endpoints including httptrace using below given property.

management.endpoints.web.exposure.include=*

but using http://localhost:8081/actuator/httptrace

request body parameter not coming in response

{
"traces": [
    {
        "timestamp": "2019-02-15T01:39:50.595Z",
        "principal": null,
        "session": null,
        "request": {
            "method": "POST",
            "uri": "http://localhost:8080/hi",
            "headers": {
                "content-length": [
                    "15"
                ],
                "postman-token": [
                    "82b0e3eb-6359-4d06-980c-669e553ef5b8"
                ],
                "host": [
                    "localhost:8080"
                ],
                "connection": [
                    "keep-alive"
                ],
                "content-type": [
                    "application/json"
                ],
                "cache-control": [
                    "no-cache"
                ],
                "accept-encoding": [
                    "gzip, deflate"
                ],
                "accept": [
                    "*/*"
                ],
                "user-agent": [
                    "PostmanRuntime/7.6.0"
                ]
            },
            "remoteAddress": null
        },
        "response": {
            "status": 200,
            "headers": {}
        },
        "timeTaken": 1
    }
]

}

Unfortunately, at the current moment it's not supported by Actuator out of the box:

Github Issue

You can implement your own endpoint as described in this StackOverflow thread

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM