diff --git a/consumer/pdata/common.go b/consumer/pdata/common.go index f208113b2cf..6ea5e10ff00 100644 --- a/consumer/pdata/common.go +++ b/consumer/pdata/common.go @@ -66,7 +66,7 @@ func (avt AttributeValueType) String() string { } // AttributeValue represents a value of an attribute. Typically used in AttributeMap. -// Must use one of NewAttributeValue* functions below to create new instances. +// Must use one of NewAttributeValue+ functions below to create new instances. // // Intended to be passed by value since internally it is just a pointer to actual // value representation. For the same reason passing by value and calling setters @@ -101,6 +101,7 @@ func NewAttributeValueNull() AttributeValue { return AttributeValue{orig: &orig} } +// Deprecated: Use NewAttributeValueNull() func NewAttributeValue() AttributeValue { return NewAttributeValueNull() } diff --git a/translator/trace/protospan_translation_test.go b/translator/trace/protospan_translation_test.go index 11d96f8a53c..a3d04ffa8c8 100644 --- a/translator/trace/protospan_translation_test.go +++ b/translator/trace/protospan_translation_test.go @@ -85,7 +85,7 @@ func TestAttributeValueToString(t *testing.T) { }, { name: "array", - input: pdata.NewAttributeValue(), + input: pdata.NewAttributeValueNull(), jsonLike: false, expected: "", },