span

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_span_span_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ExpectedSpan

type ExpectedSpan struct {
	ServiceName   string
	OperationName *string
	SpanKind      *string
	SpanStatus    *string
	// contains filtered or unexported fields
}

func NewExpectedSpan

func NewExpectedSpan(
	dto *parser.ExpectedSpanDTO,
) *ExpectedSpan

func (*ExpectedSpan) String

func (e *ExpectedSpan) String() string

type Span

type Span struct {
	SpanId        string
	ParentId      string
	ServiceName   string
	OperationName string
	SpanKind      string
	SpanStatus    string
	StartTime     time.Time
	EndTime       time.Time
	Duration      time.Duration
	Attributes    map[string]any
}

func NewSpan

func NewSpan(
	spanId *string,
	parentId *string,
	serviceName *string,
	operationName *string,
	spanKind *string,
	spanStatus *string,
	startTime *time.Time,
	endTime *time.Time,
	duration *time.Duration,
	attributes map[string]any,
) *Span

func (*Span) Equal

func (s *Span) Equal(expected *ExpectedSpan) (bool, string)

func (*Span) String

func (s *Span) String() string

func (*Span) ToProto

func (s *Span) ToProto() *SpanProto

type SpanProto

type SpanProto struct {
	SpanId        string                     `protobuf:"bytes,1,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	ParentId      string                     `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
	ServiceName   string                     `protobuf:"bytes,3,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	OperationName string                     `protobuf:"bytes,4,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"`
	SpanKind      string                     `protobuf:"bytes,5,opt,name=span_kind,json=spanKind,proto3" json:"span_kind,omitempty"`
	SpanStatus    string                     `protobuf:"bytes,6,opt,name=span_status,json=spanStatus,proto3" json:"span_status,omitempty"`
	StartTime     *timestamppb.Timestamp     `protobuf:"bytes,7,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	EndTime       *timestamppb.Timestamp     `protobuf:"bytes,8,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	Duration      *durationpb.Duration       `protobuf:"bytes,9,opt,name=duration,proto3" json:"duration,omitempty"`
	Attributes    map[string]*structpb.Value `` /* 148-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SpanProto) Descriptor deprecated

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

Deprecated: Use SpanProto.ProtoReflect.Descriptor instead.

func (*SpanProto) GetAttributes

func (x *SpanProto) GetAttributes() map[string]*structpb.Value

func (*SpanProto) GetDuration

func (x *SpanProto) GetDuration() *durationpb.Duration

func (*SpanProto) GetEndTime

func (x *SpanProto) GetEndTime() *timestamppb.Timestamp

func (*SpanProto) GetOperationName

func (x *SpanProto) GetOperationName() string

func (*SpanProto) GetParentId

func (x *SpanProto) GetParentId() string

func (*SpanProto) GetServiceName

func (x *SpanProto) GetServiceName() string

func (*SpanProto) GetSpanId

func (x *SpanProto) GetSpanId() string

func (*SpanProto) GetSpanKind

func (x *SpanProto) GetSpanKind() string

func (*SpanProto) GetSpanStatus

func (x *SpanProto) GetSpanStatus() string

func (*SpanProto) GetStartTime

func (x *SpanProto) GetStartTime() *timestamppb.Timestamp

func (*SpanProto) ProtoMessage

func (*SpanProto) ProtoMessage()

func (*SpanProto) ProtoReflect

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

func (*SpanProto) Reset

func (x *SpanProto) Reset()

func (*SpanProto) String

func (x *SpanProto) String() string

Jump to

Keyboard shortcuts

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