The “Payload Collection” rule can be used to add span attributes by collecting payload data from various sources like HTTP requests, HTTP responses, database queries, and messaging systems.
httpRequest
object
: Collect HTTP request payload data when available. Can be a client (outgoing) request or a server (incoming) request, depending on the instrumentation library.mimeTypes
string[]
: Limit payload collection to specific mime types based on the content-type header.nil
(all mime types)maxPayloadLength
number
: Maximum length of the payload to collect. If the payload is longer than this value, it will be truncated or dropped, based on the value of dropPartialPayloads
.dropPartialPayloads
boolean
: If the payload is larger than the maxPayloadLength
, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. This is useful if you require some decoding of the payload (like json) and having it partially is not useful.false
httpResponse
object
: Collect HTTP response payload data when available. Can be a client (incoming) response or a server (outgoing) response, depending on the instrumentation librarymimeTypes
string[]
: Limit payload collection to specific mime types based on the content-type header.nil
(all mime types)maxPayloadLength
number
: Maximum length of the payload to collect. If the payload is longer than this value, it will be truncated or dropped, based on the value of dropPartialPayloads
.dropPartialPayloads
boolean
: If the payload is larger than the maxPayloadLength
, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. This is useful if you require some decoding of the payload (like json) and having it partially is not useful.false
dbQuery
object
: Collect database query payload info when available.mimeTypes
string[]
: Limit payload collection to specific mime types based on the content-type header.nil
(all mime types)maxPayloadLength
number
: Maximum length of the payload to collect. If the payload is longer than this value, it will be truncated or dropped, based on the value of dropPartialPayloads
.messaging
object
: Collect messaging system operation payload info when available.mimeTypes
string[]
: Limit payload collection to specific mime types based on the content-type header.nil
(all mime types)maxPayloadLength
number
: Maximum length of the payload to collect. If the payload is longer than this value, it will be truncated or dropped, based on the value of dropPartialPayloads
.