Skip to content

[logging] REST payloads are over-stringified and lose JSON structure #2276

Open
@vchudnov-g

Description

In the current version of #2270, the httpResponse.payload field is over-stringified: it's a single string with string-encoded JSON, rather than JSON object with the various fields. Since the response is coming back as JSON, we should ideally present that JSON, or at least recreate it from the response proto, without further stringifying it.

In other words, we're getting

  "httpResponse": {
    "payload": "{\n  \"content\": \"The hail in Wales falls mainly on the snails.\",\n  \"requestId\": \"some_value\",\n  \"severity\": 0,\n  \"otherRequestId\": \"\"\n}",
    "status": 200,
    // ...
    }

whereas it would be more useful to get

  "httpResponse": {
    "payload": {
      "content": "The hail in Wales falls mainly on the snails.",
      "requestId": "some_value",
      "severity": 0,
      "otherRequestId": "",
      },
    "status": 200,
   // ...
   }

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions