Documentation ¶
Index ¶
- func SetBodyAttribute(attrName string, body []byte, truncated bool, span sdk.Span)
- func SetEncodedBodyAttribute(attrName string, body []byte, truncated bool, span sdk.Span)
- func SetTruncatedBodyAttribute(attrName string, body []byte, bodyMaxSize int, span sdk.Span)
- func SetTruncatedEncodedBodyAttribute(attrName string, body []byte, bodyMaxSize int, span sdk.Span)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetBodyAttribute ¶ added in v0.16.0
SetBodyAttribute sets the body as a span attribute. also sets truncated attribute if truncated is true
func SetEncodedBodyAttribute ¶ added in v0.16.0
SetEncodedBodyAttribute is like SetBodyAttribute above but also base64 encodes the body. This is usually due to non utf8 bytes in the body eg. for multipart/form-data content type. The body attribute name has a ".base64" suffix.
func SetTruncatedBodyAttribute ¶
SetTruncatedBodyAttribute truncates the body and sets the body as a span attribute. When body is being truncated, we also add a second attribute suffixed by `.truncated` to make it clear to the user, body has been modified.
func SetTruncatedEncodedBodyAttribute ¶ added in v0.8.0
SetTruncatedEncodedBodyAttribute is like SetTruncatedBodyAttribute above but also base64 encodes the body. This is usually due to non utf8 bytes in the body eg. for multipart/form-data content type. The body attribute name has a ".base64" suffix.
Types ¶
This section is empty.