skywalking

package
v0.0.0-...-9fcd7d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeRefType                   = "refType"
	AttributeParentService             = "parent.service"
	AttributeParentInstance            = "parent.service.instance"
	AttributeParentEndpoint            = "parent.endpoint"
	AttributeSkywalkingSpanID          = "sw8.span_id"
	AttributeSkywalkingTraceID         = "sw8.trace_id"
	AttributeSkywalkingSegmentID       = "sw8.segment_id"
	AttributeSkywalkingParentSpanID    = "sw8.parent_span_id"
	AttributeSkywalkingParentSegmentID = "sw8.parent_segment_id"
	AttributeNetworkAddressUsedAtPeer  = "network.AddressUsedAtPeer"
)

Variables

View Source
var (
	RefType_name = map[int32]string{
		0: "CrossProcess",
		1: "CrossThread",
	}

	RefType_map = map[string]RefType{
		"CrossProcess": RefType_CrossProcess,
		"CrossThread":  RefType_CrossThread,
	}
)

Enum value maps for RefType.

View Source
var (
	SpanLayer_map = map[string]SpanLayer{
		"Unknown":      SpanLayer_Unknown,
		"Database":     SpanLayer_Database,
		"RPCFramework": SpanLayer_RPCFramework,
		"Http":         SpanLayer_Http,
		"MQ":           SpanLayer_MQ,
		"Cache":        SpanLayer_Cache,
		"FAAS":         SpanLayer_FAAS,
	}
)

Enum value maps for SpanLayer.

View Source
var (
	SpanType_map = map[string]SpanType{
		"Entry": SpanType_Entry,
		"Exit":  SpanType_Exit,
		"Local": SpanType_Local,
	}
)

Enum value maps for SpanType.

Functions

func GetSpanId

func GetSpanId(segmentID string, spanID uint32) string

Types

type RefType

type RefType int32

Type of the reference

const (
	// Map to the reference targeting the segment in another OS process.
	RefType_CrossProcess RefType = 0
	// Map to the reference targeting the segment in the same process of the current one, just across thread.
	// This is only used when the coding language has the thread concept.
	RefType_CrossThread RefType = 1
)

func (RefType) String

func (x RefType) String() string

func (*RefType) UnmarshalJSON

func (s *RefType) UnmarshalJSON(data []byte) error

type SkywalkingApi

type SkywalkingApi struct {
	Address string
}

func NewSkywalkingApi

func NewSkywalkingApi(address string) *SkywalkingApi

func (*SkywalkingApi) Query

func (sw *SkywalkingApi) Query(traceId string) (*trace.OTelTrace, error)

type SkywalkingData

type SkywalkingData struct {
	Trace SkywalkingTrace `json:"trace"`
}

type SkywalkingKeyValue

type SkywalkingKeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type SkywalkingLogEntity

type SkywalkingLogEntity struct {
	Time int64                `json:"time"`
	Data []SkywalkingKeyValue `json:"data"`
}

type SkywalkingRef

type SkywalkingRef struct {
	TraceId         string  `json:"traceId"`
	ParentSegmentId string  `json:"parentSegmentId"`
	ParentSpanId    int     `json:"parentSpanId"`
	Type            RefType `json:"type"`
}

type SkywalkingResponse

type SkywalkingResponse struct {
	Data SkywalkingData `json:"data"`
}

type SkywalkingSpan

type SkywalkingSpan struct {
	TraceId             string                `json:"traceId"`
	SegmentId           string                `json:"segmentId"`
	SpanId              int                   `json:"spanId"`
	ParentSpanId        int                   `json:"parentSpanId"`
	Refs                []SkywalkingRef       `json:"refs"`
	ServiceCode         string                `json:"serviceCode"`
	ServiceInstanceName string                `json:"serviceInstanceName"`
	StartTime           int64                 `json:"startTime"`
	EndTime             int64                 `json:"endTime"`
	EndpointName        string                `json:"endpointName"`
	SpanType            SpanType              `json:"type"`
	Peer                string                `json:"peer"`
	Component           string                `json:"component"`
	IsError             bool                  `json:"isError"`
	SpanLayer           SpanLayer             `json:"layer"`
	Tags                []SkywalkingKeyValue  `json:"tags"`
	Logs                []SkywalkingLogEntity `json:"logs"`
	IsRoot              bool                  `json:"isRoot"`
	SegmentSpanId       string                `json:"segmentSpanId"`
	SegmentParentSpanId string                `json:"segmentParentSpanId"`
}

type SkywalkingTrace

type SkywalkingTrace struct {
	Spans []SkywalkingSpan `json:"spans"`
}

type SpanLayer

type SpanLayer int32

Map to the layer of span

const (
	// Unknown layer. Could be anything.
	SpanLayer_Unknown SpanLayer = 0
	// A database layer, used in tracing the database client component.
	SpanLayer_Database SpanLayer = 1
	// A RPC layer, used in both client and server sides of RPC component.
	SpanLayer_RPCFramework SpanLayer = 2
	// HTTP is a more specific RPCFramework.
	SpanLayer_Http SpanLayer = 3
	// A MQ layer, used in both producer and consuer sides of the MQ component.
	SpanLayer_MQ SpanLayer = 4
	// A cache layer, used in tracing the cache client component.
	SpanLayer_Cache SpanLayer = 5
	// A FAAS layer, used in function-as-a-Service platform.
	SpanLayer_FAAS SpanLayer = 6
)

func (*SpanLayer) UnmarshalJSON

func (s *SpanLayer) UnmarshalJSON(data []byte) error

type SpanType

type SpanType int32

Map to the type of span

const (
	// Server side of RPC. Consumer side of MQ.
	SpanType_Entry SpanType = 0
	// Client side of RPC. Producer side of MQ.
	SpanType_Exit SpanType = 1
	// A common local code execution.
	SpanType_Local SpanType = 2
)

func (*SpanType) UnmarshalJSON

func (s *SpanType) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL