{"source":"semconv","version":"1.45.0","attribute":{"id":"http.response.body.content","type":"any","stability":"development","brief":"The content of the HTTP response body, with any content coding indicated by [Content-Encoding](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding) removed, captured as a string when the response content is textual or as byte array otherwise.","note":"Captured value MAY be limited in size and thus value is expected to be truncated in many cases.\nWhen an instrumentation applies a byte-based limit while capturing the body as a string, it SHOULD truncate on a character\nboundary so that the recorded value remains valid text.\n\nInstrumentations MUST NOT capture this attribute by default and MAY provide an option to enable it.\n\n> [!WARNING]\n> This attribute may contain sensitive information.\n\nWhen instrumentations record body, they SHOULD capture the body as string whenever possible as it makes it easier to use in human-readable form,\nalso it allows to implement sanitization if needed.\n\nTextual content is typically detected based on the [Content-Type](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-type) header using heuristics\nsuch as checking if the type/subtype (compared case-insensitively, ignoring any parameters) starts with `text/`, ends with `/json`, `+json`, `/xml`, `+xml`, `/yaml` or `+yaml`,\nis `application/x-www-form-urlencoded`, or if the header declares a `charset` parameter.\n\nInstrumentations that implement response body recording MUST NOT intentionally introduce side effects such as changing stream position or closing body stream independently from the\napplication.\n\nWhen body is recorded, the instrumentation SHOULD record part of the body that was sent or received at the time HTTP call has ended.\nNote that HTTP client spans [SHOULD end sometime after the response headers are fully read](/docs/http/http-spans.md#http-client-span-duration),\nwhich may or may not include reading the response body, so on client spans this attribute is often absent or holds only part of the body.\n\nThe value MUST be either a string or a byte array. Instrumentations MUST NOT record a parsed or otherwise structured representation of the body,\nand MUST NOT base64-encode binary content into a string value.","examples":["Hello world!","{\"foo\": \"bar\"}"],"namespace":"http","definedIn":"model/http/registry.yaml","usedBy":[{"groupId":"span.http.client","groupType":"span","requirementLevel":"opt_in"},{"groupId":"span.http.server","groupType":"span","requirementLevel":"opt_in"}]},"history":[{"version":"1.45.0","publishedAt":"2026-11-02T16:11:42Z","kind":"first-seen","detail":"Added as development.","severity":"informational"}],"replaces":[]}