func (e *AttributeEncoder) Encode(iter attribute.Iterator) string {
	buf := e.pool.Get().(*bytes.Buffer)
	defer e.pool.Put(buf)
	buf.Reset()
	for iter.Next() {
		e.encodeOne(buf, iter.Attribute())
	}
	return buf.String()
}
Encode emits a string like "|#key1:value1,key2:value2".
package dogstatsd
import (
	"bytes"
	"sync"
	"go.opentelemetry.io/otel/attribute"
)
type AttributeEncoder struct {
	pool sync.Pool
}
var _ attribute.Encoder = &AttributeEncoder{}
var leID = attribute.NewEncoderID()
func NewAttributeEncoder() *AttributeEncoder {
	return &AttributeEncoder{
		pool: sync.Pool{
			New: func() interface{} {
				return &bytes.Buffer{}
			},
		},
	}
}