sentry-rust icon indicating copy to clipboard operation
sentry-rust copied to clipboard

request.data field should support structured data

Open boxxxie opened this issue 3 years ago • 0 comments

reference docs: https://develop.sentry.dev/sdk/event-payloads/request/

data Optional. Submitted data in a format that makes the most sense. SDKs should discard large bodies by default. Can be given as string or structural data of any format.

structural data of any format

example from docs: https://develop.sentry.dev/sdk/event-payloads/request/#examples

{
  "request": {
    "method": "POST",
    "url": "http://absolute.uri/foo",
    "query_string": "query=foobar&page=2",
    "data": {
      "foo": "bar"
    },
    "cookies": "PHPSESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;",
    "headers": {
      "content-type": "text/html"
    },
    "env": {
      "REMOTE_ADDR": "192.168.0.1"
    }
  }
}

Environment

sentry-cli --version                                                
sentry-cli 2.5.0

Steps to Reproduce

bug example:

{
  "request": {
    "data": {
      "test": "val"
    }
  }
}

working example:

{
  "request": {
    "data":"data string"
  }
}

Actual Result

sentry-cli send-event --no-environ "test_file.json" produces: error: invalid type: map, expected a string at line 3 column 13

boxxxie avatar Jul 21 '22 18:07 boxxxie