You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Traces(otlp): Render bytes and value-less resource and scope attributes as string tags #3715
The Agent renders every OTLP attribute value with pcommon.Value.AsString(): bytes become base64 strings, and an absent value becomes an empty string. #3713 brings ADP's span attributes in line. The Agent does the same for the other two kinds of attribute on a span:
Resource attributes:each value is v.AsString(). The only exception is a key that a numeric span attribute already put in Metrics.
ADP differs on three paths, and #3713 changes none of them:
Resource attributes, per-span pass (transform.rs): skips an attribute with no value, and renders bytes as the placeholder <N bytes> through otlp_value_to_string.
Resource attributes, trace level (translator.rs): skips an attribute with no value, and keeps bytes as AttributeValue::Bytes, which the encoder writes as a bytes attribute.
Resource attributes also feed hostname, container-tag and semantic lookups, so changing how they are stored needs care: a lookup that sees an empty entry must treat it as absent, as it does now.
A bytes resource attribute is sent as a base64 string tag, in both resource paths
A resource attribute with no value is sent as an empty string tag
A bytes scope attribute is sent as a base64 string tag
A scope attribute with no value is sent as an empty string tag
Hostname, container-tag and semantic lookups that read resource attributes still treat an empty value as absent
Also check
The Agent's AsString() also renders numeric and boolean resource attributes as strings. At trace level ADP keeps them typed (Int, Float, Bool). Whether the output differs on the wire isn't verified.
Activity