You can include response body in analytics by using the set_response_body() function.

Compatibility

Compatible with all Ruby agent versions.

Syntax

set_response_body(value)

Parameter

Parameter Type Description
value String (Required) Response body can have any value in string.

Example

copy
icon/buttons/copy
Atatus.set_response_body([
  {
    "name": "Make it big",
    "href": "/api/catalog/accounts/60073/account_preferences/primary_color_border",
    "kind": "self_service#account_preference",
    "value": "476189",
    "timestamps": {
      "created_at": "2022-06-08T19:29:36.513+00:00",
      "updated_at": "2022-06-28T17:42:12.513+00:00"
    }
  }
].to_json)
copy
icon/buttons/copy
Atatus.set_response_body('{
  "plan": "Premium",
  "price": 199,
  "features": ["saml", "audit_logs", "pro_functions"],
  "created_at": "2022-07-07T22:49:16.513+00:00",
  "updated_at": "2022-07-25T21:55:22.513+00:00"
}')