Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertKVListToMap(attr []*commonv1.KeyValue) map[string]interface{}
- func ConvertToIpv4(ipStr string) string
- func GenerateAttribStoreKey(spanDetailsMap map[string]interface{}, protocol ExecutorModel.ProtocolName) cache.AttribStoreKey
- func GetExecutorProtocolFromSpanProtocol(spanProtocol model.ProtocolType) zkmodel.ProtocolName
- func GetK8sClient() (*kubernetes.Clientset, error)
- func GetMD5OfMap(m map[string]interface{}) string
- func GetPodIP(podName string, namespace string) (string, error)
- func GetResourceIp(spanKind model.SpanKind, sourceIp string, destIp string) string
- func GetSchemaVersion(schemaUrl string) string
- func GetSchemaVersionFromSpanDetailsMap(spanDetailsMap map[string]interface{}) string
- func GetServiceName(resourceAttributesMap map[string]interface{}) string
- func GetSourceDestIPPair(spanKind model.SpanKind, attributes map[string]interface{}, ...) (string, string)
- func GetSpanAttributeValue[T string | float64](attrId AttributeID, spanDetailsMap *map[string]interface{}, ...) *T
- func GetSpanKind(kind tracev1.Span_SpanKind) model.SpanKind
- func ObjectToInterfaceMap(spanDetails any) map[string]interface{}
- type AttributeID
- type SpanProtocolUtil
Constants ¶
View Source
const ( ScopeAttributeHashPrefix = "sh_" // sh stands for scope hash ResourceAttributeHashPrefix = "rh_" // rh stands for resource hash )
Variables ¶
View Source
var DetectSpanProtocolMap = map[AttributeID]model.ProtocolType{ HTTPIdentifierAttrId: model.ProtocolTypeHTTP, DBIdentifierAttrId: model.ProtocolTypeDB, GRPCIdentifierAttrId: model.ProtocolTypeGRPC, }
DetectSpanProtocolMap Mapping of span attributes to protocol type.
View Source
var NET_HOST_IP = "net.host.ip"
View Source
var NET_PEER_IP = "net.peer.ip"
View Source
var NET_PEER_NAME = "net.peer.name"
View Source
var NET_SOCK_HOST_ADDR = "net.sock.host.addr"
View Source
var NET_SOCK_PEER_ADDR = "net.sock.peer.addr"
View Source
var SERVER_SOCKET_ADDRESS = "server.socket.address"
Functions ¶
func ConvertKVListToMap ¶
func ConvertToIpv4 ¶
func GenerateAttribStoreKey ¶
func GenerateAttribStoreKey(spanDetailsMap map[string]interface{}, protocol ExecutorModel.ProtocolName) cache.AttribStoreKey
func GetExecutorProtocolFromSpanProtocol ¶
func GetExecutorProtocolFromSpanProtocol(spanProtocol model.ProtocolType) zkmodel.ProtocolName
func GetK8sClient ¶
func GetK8sClient() (*kubernetes.Clientset, error)
func GetMD5OfMap ¶
func GetResourceIp ¶
func GetSchemaVersion ¶
func GetServiceName ¶
func GetSourceDestIPPair ¶
func GetSpanAttributeValue ¶
func GetSpanAttributeValue[T string | float64](attrId AttributeID, spanDetailsMap *map[string]interface{}, executorAttrStore *stores.ExecutorAttrStore, functionFactory *functions.FunctionFactory, attribStoreKey *cache.AttribStoreKey) *T
func GetSpanKind ¶
func GetSpanKind(kind tracev1.Span_SpanKind) model.SpanKind
func ObjectToInterfaceMap ¶
Types ¶
type AttributeID ¶
type AttributeID string
const ( DBIdentifierAttrId AttributeID = "db_identifier" DBSystemAttrId AttributeID = "db_system" DBMethodAttrId AttributeID = "" DBRouteAttrId AttributeID = "" DBSchemeAttrId AttributeID = "" DBPathAttrId AttributeID = "" DBQueryAttrId AttributeID = "" DBStatusAttrId AttributeID = "" DBUsernameAttrId AttributeID = "" )
const ( GRPCIdentifierAttrId AttributeID = "rpc_identifier" GRPCSystemAttrId AttributeID = "rpc_system" GRPCMethodAttrId AttributeID = "rpc_method" GRPCRouteAttrId AttributeID = "rpc_service" GRPCSchemeAttrId AttributeID = "rpc_system" GRPCPathAttrId AttributeID = "rpc_service" GRPCQueryAttrId AttributeID = "" GRPCStatusAttrId AttributeID = "rpc_grpc_status_code" GRPCUsernameAttrId AttributeID = "" )
const ( HTTPIdentifierAttrId AttributeID = "http_identifier" HTTPMethodAttrId AttributeID = "http_request_method" HTTPRouteAttrId AttributeID = "http_route" HTTPSchemeAttrId AttributeID = "url_scheme" HTTPPathAttrId AttributeID = "url_full" HTTPQueryAttrId AttributeID = "" HTTPStatusAttrId AttributeID = "http_response_status_code" HTTPUsernameAttrId AttributeID = "" )
type SpanProtocolUtil ¶
type SpanProtocolUtil struct {
// contains filtered or unexported fields
}
func NewSpanProtocolUtil ¶
func NewSpanProtocolUtil(spanDetails *model.OTelSpanDetails, spanDetailsMap *map[string]interface{}, executorAttrStore *stores.ExecutorAttrStore, podDetailsStore *stores.LocalCacheHSetStore, attrStoreKey *cache.AttribStoreKey) SpanProtocolUtil
func (SpanProtocolUtil) AddDBSpanProperties ¶
func (s SpanProtocolUtil) AddDBSpanProperties()
func (SpanProtocolUtil) AddGRPCSpanProperties ¶
func (s SpanProtocolUtil) AddGRPCSpanProperties()
func (SpanProtocolUtil) AddHTTPSpanProperties ¶
func (s SpanProtocolUtil) AddHTTPSpanProperties()
func (SpanProtocolUtil) AddSpanProtocolProperties ¶
func (s SpanProtocolUtil) AddSpanProtocolProperties()
func (SpanProtocolUtil) DetectSpanProtocol ¶
func (s SpanProtocolUtil) DetectSpanProtocol() model.ProtocolType
Click to show internal directories.
Click to hide internal directories.