trace

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SpanKind_name = map[int32]string{
		0: "SPAN_KIND_UNSPECIFIED",
		1: "SPAN_KIND_INTERNAL",
		2: "SPAN_KIND_SERVER",
		3: "SPAN_KIND_CLIENT",
		4: "SPAN_KIND_PRODUCER",
		5: "SPAN_KIND_CONSUMER",
	}
	SpanKind_value = map[string]int32{
		"SPAN_KIND_UNSPECIFIED": 0,
		"SPAN_KIND_INTERNAL":    1,
		"SPAN_KIND_SERVER":      2,
		"SPAN_KIND_CLIENT":      3,
		"SPAN_KIND_PRODUCER":    4,
		"SPAN_KIND_CONSUMER":    5,
	}
)

Enum value maps for SpanKind.

View Source
var (
	SpanStatusCode_name = map[int32]string{
		0: "STATUS_CODE_UNSET",
		1: "STATUS_CODE_OK",
		2: "STATUS_CODE_ERROR",
	}
	SpanStatusCode_value = map[string]int32{
		"STATUS_CODE_UNSET": 0,
		"STATUS_CODE_OK":    1,
		"STATUS_CODE_ERROR": 2,
	}
)

Enum value maps for SpanStatusCode.

View Source
var File_v1_trace_labels_proto protoreflect.FileDescriptor
View Source
var File_v1_trace_span_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Span

type Span struct {

	// A unique identifier for a trace.
	TraceID string `protobuf:"bytes,1,opt,name=TraceID,proto3" json:"TraceID,omitempty"`
	// A unique identifier for a span within a trace.
	SpanID string `protobuf:"bytes,2,opt,name=SpanID,proto3" json:"SpanID,omitempty"`
	// The start time of the span.
	StartTimeUnixNano int64 `protobuf:"fixed64,3,opt,name=StartTimeUnixNano,proto3" json:"StartTimeUnixNano,omitempty"`
	// The end time of the span.
	EndTimeUnixNano int64 `protobuf:"fixed64,4,opt,name=EndTimeUnixNano,proto3" json:"EndTimeUnixNano,omitempty"`
	// A description of the span's operation.
	Name string `protobuf:"bytes,5,opt,name=Name,proto3" json:"Name,omitempty"`
	// Logical name of the service.
	ServiceName string `protobuf:"bytes,6,opt,name=ServiceName,proto3" json:"ServiceName,omitempty"`
	// Distinguishes between spans generated in a particular context.
	Kind SpanKind `protobuf:"varint,7,opt,name=Kind,proto3,enum=k6.cloud.insights.proto.v1.trace.SpanKind" json:"Kind,omitempty"`
	// The status code.
	StatusCode SpanStatusCode `` /* 127-byte string literal not displayed */
	// The attributes associated with the span.
	// https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/resource/semantic_conventions
	// https://github.com/opentracing/specification/blob/master/semantic_conventions.md#span-tags-table
	Attributes []*common.KeyValue `protobuf:"bytes,9,rep,name=Attributes,proto3" json:"Attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*Span) Descriptor deprecated

func (*Span) Descriptor() ([]byte, []int)

Deprecated: Use Span.ProtoReflect.Descriptor instead.

func (*Span) GetAttributes

func (x *Span) GetAttributes() []*common.KeyValue

func (*Span) GetEndTimeUnixNano

func (x *Span) GetEndTimeUnixNano() int64

func (*Span) GetKind

func (x *Span) GetKind() SpanKind

func (*Span) GetName

func (x *Span) GetName() string

func (*Span) GetServiceName

func (x *Span) GetServiceName() string

func (*Span) GetSpanID

func (x *Span) GetSpanID() string

func (*Span) GetStartTimeUnixNano

func (x *Span) GetStartTimeUnixNano() int64

func (*Span) GetStatusCode

func (x *Span) GetStatusCode() SpanStatusCode

func (*Span) GetTraceID

func (x *Span) GetTraceID() string

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) ProtoReflect

func (x *Span) ProtoReflect() protoreflect.Message

func (*Span) Reset

func (x *Span) Reset()

func (*Span) String

func (x *Span) String() string

type SpanKind

type SpanKind int32

SpanKind is the type of span.

const (
	// Unspecified. Do NOT use as default.
	SpanKind_SPAN_KIND_UNSPECIFIED SpanKind = 0
	// Indicates that the span represents an internal operation within an application,
	// as opposed to an operation happening at the boundaries. Default value.
	SpanKind_SPAN_KIND_INTERNAL SpanKind = 1
	// Indicates that the span covers server-side handling of an RPC or other
	// remote network request.
	SpanKind_SPAN_KIND_SERVER SpanKind = 2
	// Indicates that the span describes a request to some remote service.
	SpanKind_SPAN_KIND_CLIENT SpanKind = 3
	// Indicates that the span describes a producer sending a message to a broker.
	SpanKind_SPAN_KIND_PRODUCER SpanKind = 4
	// Indicates that the span describes consumer receiving a message from a broker.
	SpanKind_SPAN_KIND_CONSUMER SpanKind = 5
)

func (SpanKind) Descriptor

func (SpanKind) Descriptor() protoreflect.EnumDescriptor

func (SpanKind) Enum

func (x SpanKind) Enum() *SpanKind

func (SpanKind) EnumDescriptor deprecated

func (SpanKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use SpanKind.Descriptor instead.

func (SpanKind) Number

func (x SpanKind) Number() protoreflect.EnumNumber

func (SpanKind) String

func (x SpanKind) String() string

func (SpanKind) Type

type SpanLabels

type SpanLabels struct {
	Name        string         `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	ServiceName string         `protobuf:"bytes,2,opt,name=ServiceName,proto3" json:"ServiceName,omitempty"`
	Kind        SpanKind       `protobuf:"varint,3,opt,name=Kind,proto3,enum=k6.cloud.insights.proto.v1.trace.SpanKind" json:"Kind,omitempty"`
	StatusCode  SpanStatusCode `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SpanLabels) Descriptor deprecated

func (*SpanLabels) Descriptor() ([]byte, []int)

Deprecated: Use SpanLabels.ProtoReflect.Descriptor instead.

func (*SpanLabels) GetKind

func (x *SpanLabels) GetKind() SpanKind

func (*SpanLabels) GetName

func (x *SpanLabels) GetName() string

func (*SpanLabels) GetServiceName

func (x *SpanLabels) GetServiceName() string

func (*SpanLabels) GetStatusCode

func (x *SpanLabels) GetStatusCode() SpanStatusCode

func (*SpanLabels) ProtoMessage

func (*SpanLabels) ProtoMessage()

func (*SpanLabels) ProtoReflect

func (x *SpanLabels) ProtoReflect() protoreflect.Message

func (*SpanLabels) Reset

func (x *SpanLabels) Reset()

func (*SpanLabels) String

func (x *SpanLabels) String() string

type SpanStatusCode

type SpanStatusCode int32

For the semantics of status codes see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status

const (
	// The default status.
	SpanStatusCode_STATUS_CODE_UNSET SpanStatusCode = 0
	// The Span has been validated by an Application developers or Operator to have completed successfully.
	SpanStatusCode_STATUS_CODE_OK SpanStatusCode = 1
	// The Span contains an error.
	SpanStatusCode_STATUS_CODE_ERROR SpanStatusCode = 2
)

func (SpanStatusCode) Descriptor

func (SpanStatusCode) Enum

func (x SpanStatusCode) Enum() *SpanStatusCode

func (SpanStatusCode) EnumDescriptor deprecated

func (SpanStatusCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use SpanStatusCode.Descriptor instead.

func (SpanStatusCode) Number

func (SpanStatusCode) String

func (x SpanStatusCode) String() string

func (SpanStatusCode) Type

Jump to

Keyboard shortcuts

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