bodyattribute

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetBodyAttribute added in v0.16.0

func SetBodyAttribute(attrName string, body []byte, truncated bool, span sdk.Span)

SetBodyAttribute sets the body as a span attribute. also sets truncated attribute if truncated is true

func SetEncodedBodyAttribute added in v0.16.0

func SetEncodedBodyAttribute(attrName string, body []byte, truncated bool, span sdk.Span)

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

func SetTruncatedBodyAttribute(attrName string, body []byte, bodyMaxSize int, span sdk.Span)

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

func SetTruncatedEncodedBodyAttribute(attrName string, body []byte, bodyMaxSize int, span sdk.Span)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL