in packages/opentelemetry-cloud-trace-exporter/src/transform.ts [229:247]
function transformAttributeValues(
attributes: ot.SpanAttributes,
stringifyArrayAttributes?: boolean
): AttributeMap {
const out: AttributeMap = {};
for (const [key, value] of Object.entries(attributes)) {
if (value === undefined) {
continue;
}
const attributeValue = valueToAttributeValue(
value,
stringifyArrayAttributes
);
if (attributeValue !== undefined) {
out[key] = attributeValue;
}
}
return out;
}