package attrnorm
Import Path
go.opentelemetry.io/otel/sdk/internal/attrnorm (on go.dev)
Dependency Relation
imports 5 packages, and imported by 2 packages
Package-Level Functions (total 13)
KeyValueDedup returns kv with all map values deduplicated and whether
it changed.
KeyValueDedupLimitDepth returns kv with all map values
deduplicated and all array and map values limited to depthLimit. The boolean
results report depth limiting and deduplication changes, respectively.
KeyValueLimitDepth returns kv with all array and map values limited to
depthLimit. Map keys are not deduplicated.
KeyValuesDedup returns kvs with all map values deduplicated and whether
they changed.
The returned slice is the original kvs slice if no value needs
deduplication. Top-level keys in kvs are not deduplicated.
KeyValuesDedupLimitDepth returns kvs with all map values
deduplicated and all array and map values limited to depthLimit. The boolean
results report depth limiting and deduplication changes, respectively.
The returned slice is the original kvs slice if no value needs
normalization. Top-level keys in kvs are not deduplicated.
SetDedup returns set with all map values deduplicated and whether it
changed.
The returned Set is the original set if no value needs deduplication.
Top-level key uniqueness remains attribute.Set's responsibility; this only
normalizes map attribute values.
SetDedupLimitDepth returns set with all map values deduplicated and
all array and map values limited to depthLimit. The boolean results report
depth limiting and deduplication changes, respectively.
The returned Set is the original set if no value needs normalization.
Top-level key uniqueness remains attribute.Set's responsibility; this only
normalizes attribute values.
SetLimitDepth returns set with all array and map values limited to
depthLimit. Map keys are not deduplicated.
The returned Set is the original set if no value changes.
Truncate returns a truncated version of attr. Only string, string slice,
byte slice, slice, and map attribute values are truncated. String values are
truncated according to limit. Each string slice value is truncated in this
fashion (the slice length itself is unaffected), and byte slice values are
truncated to at most limit bytes. For slice and map attribute values, the
limit is applied recursively to contained values.
No truncation is performed for a negative limit.
TruncateValue returns a truncated version of v. Only string, string
slice, byte slice, and (recursively) slice and map values are modified.
No truncation is performed for a negative limit.
ValueDedup returns value with all map values deduplicated and whether
it changed.
Duplicate map keys are resolved using last-value-wins semantics.
ValueDedupLimitDepth returns value with all map values
deduplicated and all array and map values limited to depthLimit. The boolean
results report depth limiting and deduplication changes, respectively.
Duplicate map keys are resolved using last-value-wins semantics. Depth
starts at one for value and increments when descending into an array element
or map value. An array or map beyond a non-negative depthLimit is replaced by
an empty value. A negative depthLimit disables depth limiting.
ValueLimitDepth returns value with all array and map values limited to
depthLimit. Map keys are not deduplicated.
Depth starts at one for value and increments when descending into an array
element or map value. An array or map beyond a non-negative depthLimit is
replaced by an empty value. A negative depthLimit disables depth limiting.
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |