mirror of
https://github.com/hanzoai/otel-collector.git
synced 2026-11-02 13:34:59 +00:00
- added signozclickhousemeterexporter contributes to - https://github.com/SigNoz/platform-pod/issues/983
26 lines
460 B
Go
26 lines
460 B
Go
package fingerprint
|
|
|
|
import (
|
|
"go.opentelemetry.io/collector/pdata/pcommon"
|
|
)
|
|
|
|
type Value struct {
|
|
DataType pcommon.ValueType
|
|
Val string
|
|
}
|
|
|
|
type Attributes map[string]Value
|
|
|
|
func NewAttributesFromPcommonMap(attrs pcommon.Map) Attributes {
|
|
attrMap := make(map[string]Value, attrs.Len())
|
|
attrs.Range(func(k string, v pcommon.Value) bool {
|
|
attrMap[k] = Value{
|
|
DataType: v.Type(),
|
|
Val: v.AsString(),
|
|
}
|
|
return true
|
|
})
|
|
|
|
return attrMap
|
|
}
|