aws / aws-xray-sdk-go

AWS X-Ray SDK for the Go programming language.
Apache License 2.0
276 stars 117 forks source link

Remove url query string from http segments #227

Closed crathjen closed 4 years ago

crathjen commented 4 years ago

We have an integration with an external api that forces us to put sensitive data into a query string. We would like to be able to use the xray.RoundTripper to trace these http calls without having the sensitive data show up in our traces.

Current behavior (v1.0.0)

raw subsegment contains query string:

{
    "id": "0001",
    "name": "example.com",
    "start_time": 1588196348.011705,
    "end_time": 1588196348.1139553,
    "http": {
        "request": {
            "url": "https://example.com/path?secret=1010",
            "method": "GET"
        },
        "response": {
            "status": 200
        }
    },
    "namespace": "remote",
    "subsegments": [
        {
            "id": "0002",
            "name": "request",
            "start_time": 1588196348.0117335,
            "end_time": 1588196348.0118144
        },
        {
            "id": "0003",
            "name": "response",
            "start_time": 1588196348.0118186,
            "end_time": 1588196348.1139154
        }
    ]
}

Desired Behavior

subsegment omits query string:

Saw in another xray project that excluding the query string was endorsed as desirable behavior: https://github.com/aws/aws-xray-sdk-node/issues/246#issuecomment-583911048

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

bhautikpip commented 4 years ago

Fix for this issue released in v1.1.0 so resolving.