tracingpb

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnonymousTagGroupName is the name of the anonymous tag group.
	AnonymousTagGroupName = ""
)
View Source
const LogMessageField = "event"

LogMessageField is the field name used for the log message in a LogRecord.

Variables

View Source
var (
	ErrInvalidLengthRecordedSpan        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRecordedSpan          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRecordedSpan = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTracing        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTracing          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTracing = fmt.Errorf("proto: unexpected end of group")
)
View Source
var RecordingMode_name = map[int32]string{
	0: "OFF",
	1: "VERBOSE",
	2: "STRUCTURED",
}
View Source
var RecordingMode_value = map[string]int32{
	"OFF":        0,
	"VERBOSE":    1,
	"STRUCTURED": 2,
}

Functions

func MessageToJSONString

func MessageToJSONString(msg protoutil.Message, emitDefaults bool) (string, error)

MessageToJSONString converts a protocol message into a JSON string. The emitDefaults flag dictates whether fields with zero values are rendered or not.

TODO(andrei): It'd be nice if this function dealt with redactable vs safe fields, like EventPayload.AppendJSONFields does.

Types

type CapturedStack

type CapturedStack struct {
	// Stack is the strack trace, or distinct prefix of the stack trace if a previous
	// capture of this stack is also being recorded.
	Stack string `protobuf:"bytes,1,opt,name=stack,proto3" json:"stack,omitempty"`
	// SharedSuffix indicates the length of the elided suffix of this stack that
	// was identical to the previous capture of this stack.
	SharedSuffix int32 `protobuf:"varint,2,opt,name=shared_suffix,json=sharedSuffix,proto3" json:"shared_suffix,omitempty"`
	// SharedLines indicated how many newlines were in the elided shared suffix.
	SharedLines int32 `protobuf:"varint,3,opt,name=shared_lines,json=sharedLines,proto3" json:"shared_lines,omitempty"`
	// Age indicates the duration prior to being recorded that this stack was captured.
	Age time.Duration `protobuf:"varint,4,opt,name=age,proto3,casttype=time.Duration" json:"age,omitempty"`
}

func (*CapturedStack) Descriptor

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

func (*CapturedStack) Marshal

func (m *CapturedStack) Marshal() (dAtA []byte, err error)

func (*CapturedStack) MarshalTo

func (m *CapturedStack) MarshalTo(dAtA []byte) (int, error)

func (*CapturedStack) MarshalToSizedBuffer

func (m *CapturedStack) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CapturedStack) ProtoMessage

func (*CapturedStack) ProtoMessage()

func (*CapturedStack) Reset

func (m *CapturedStack) Reset()

func (*CapturedStack) Size

func (m *CapturedStack) Size() (n int)

func (CapturedStack) String

func (c CapturedStack) String() string

func (*CapturedStack) Unmarshal

func (m *CapturedStack) Unmarshal(dAtA []byte) error

func (*CapturedStack) XXX_DiscardUnknown

func (m *CapturedStack) XXX_DiscardUnknown()

func (*CapturedStack) XXX_Marshal

func (m *CapturedStack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CapturedStack) XXX_Merge

func (m *CapturedStack) XXX_Merge(src proto.Message)

func (*CapturedStack) XXX_Size

func (m *CapturedStack) XXX_Size() int

func (*CapturedStack) XXX_Unmarshal

func (m *CapturedStack) XXX_Unmarshal(b []byte) error

type LogRecord

type LogRecord struct {
	// Time of the log record.
	Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
	// The log message.
	Message github_com_cockroachdb_redact.RedactableString `protobuf:"bytes,3,opt,name=message,proto3,customtype=github.com/cockroachdb/redact.RedactableString" json:"message"`
}

LogRecord is a log message recorded in a traced span.

func (*LogRecord) Descriptor

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

func (*LogRecord) Marshal

func (m *LogRecord) Marshal() (dAtA []byte, err error)

func (*LogRecord) MarshalTo

func (m *LogRecord) MarshalTo(dAtA []byte) (int, error)

func (*LogRecord) MarshalToSizedBuffer

func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogRecord) MemorySize

func (l *LogRecord) MemorySize() int

MemorySize implements the sizable interface.

func (LogRecord) Msg

Msg extracts the message of the LogRecord, which is either in an "event" or "error" field.

func (*LogRecord) ProtoMessage

func (*LogRecord) ProtoMessage()

func (*LogRecord) Reset

func (m *LogRecord) Reset()

func (*LogRecord) Size

func (m *LogRecord) Size() (n int)

func (*LogRecord) String

func (m *LogRecord) String() string

func (*LogRecord) Unmarshal

func (m *LogRecord) Unmarshal(dAtA []byte) error

func (*LogRecord) XXX_DiscardUnknown

func (m *LogRecord) XXX_DiscardUnknown()

func (*LogRecord) XXX_Marshal

func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogRecord) XXX_Merge

func (m *LogRecord) XXX_Merge(src proto.Message)

func (*LogRecord) XXX_Size

func (m *LogRecord) XXX_Size() int

func (*LogRecord) XXX_Unmarshal

func (m *LogRecord) XXX_Unmarshal(b []byte) error

type LogRecord_Field

type LogRecord_Field struct {
	Key   string                                         `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value github_com_cockroachdb_redact.RedactableString `protobuf:"bytes,2,opt,name=value,proto3,customtype=github.com/cockroachdb/redact.RedactableString" json:"value"`
}

func (*LogRecord_Field) Descriptor

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

func (*LogRecord_Field) Marshal

func (m *LogRecord_Field) Marshal() (dAtA []byte, err error)

func (*LogRecord_Field) MarshalTo

func (m *LogRecord_Field) MarshalTo(dAtA []byte) (int, error)

func (*LogRecord_Field) MarshalToSizedBuffer

func (m *LogRecord_Field) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogRecord_Field) ProtoMessage

func (*LogRecord_Field) ProtoMessage()

func (*LogRecord_Field) Reset

func (m *LogRecord_Field) Reset()

func (*LogRecord_Field) Size

func (m *LogRecord_Field) Size() (n int)

func (*LogRecord_Field) String

func (m *LogRecord_Field) String() string

func (*LogRecord_Field) Unmarshal

func (m *LogRecord_Field) Unmarshal(dAtA []byte) error

func (*LogRecord_Field) XXX_DiscardUnknown

func (m *LogRecord_Field) XXX_DiscardUnknown()

func (*LogRecord_Field) XXX_Marshal

func (m *LogRecord_Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogRecord_Field) XXX_Merge

func (m *LogRecord_Field) XXX_Merge(src proto.Message)

func (*LogRecord_Field) XXX_Size

func (m *LogRecord_Field) XXX_Size() int

func (*LogRecord_Field) XXX_Unmarshal

func (m *LogRecord_Field) XXX_Unmarshal(b []byte) error

type NormalizedSpan

type NormalizedSpan struct {
	Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"`
	// Deprecated. Avoid new uses. Prefer tag_groups.
	// TODO(benbardin): Deprecate the tags field for 23.1.
	Tags              map[string]string            `` /* 149-byte string literal not displayed */
	TagGroups         []TagGroup                   `protobuf:"bytes,8,rep,name=tag_groups,json=tagGroups,proto3" json:"tag_groups"`
	StartTime         time.Time                    `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	Duration          time.Duration                `protobuf:"bytes,4,opt,name=duration,proto3,stdduration" json:"duration"`
	Logs              []LogRecord                  `protobuf:"bytes,5,rep,name=logs,proto3" json:"logs"`
	StructuredRecords []StructuredRecord           `protobuf:"bytes,7,rep,name=structured_records,json=structuredRecords,proto3" json:"structured_records"`
	ChildrenMetadata  map[string]OperationMetadata `` /* 187-byte string literal not displayed */
	Children          []NormalizedSpan             `protobuf:"bytes,6,rep,name=children,proto3" json:"children"`
}

NormalizedSpan is a representation of a RecordedSpan from a trace with all its children embedded, recursively. This JSON serialization of this proto is used in the system.statement_diagnostics.trace column.

See RecordedSpan for the description of the fields.

func (*NormalizedSpan) Descriptor

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

func (*NormalizedSpan) Marshal

func (m *NormalizedSpan) Marshal() (dAtA []byte, err error)

func (*NormalizedSpan) MarshalTo

func (m *NormalizedSpan) MarshalTo(dAtA []byte) (int, error)

func (*NormalizedSpan) MarshalToSizedBuffer

func (m *NormalizedSpan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NormalizedSpan) ProtoMessage

func (*NormalizedSpan) ProtoMessage()

func (*NormalizedSpan) Reset

func (m *NormalizedSpan) Reset()

func (*NormalizedSpan) Size

func (m *NormalizedSpan) Size() (n int)

func (*NormalizedSpan) String

func (m *NormalizedSpan) String() string

func (*NormalizedSpan) Unmarshal

func (m *NormalizedSpan) Unmarshal(dAtA []byte) error

func (*NormalizedSpan) XXX_DiscardUnknown

func (m *NormalizedSpan) XXX_DiscardUnknown()

func (*NormalizedSpan) XXX_Marshal

func (m *NormalizedSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NormalizedSpan) XXX_Merge

func (m *NormalizedSpan) XXX_Merge(src proto.Message)

func (*NormalizedSpan) XXX_Size

func (m *NormalizedSpan) XXX_Size() int

func (*NormalizedSpan) XXX_Unmarshal

func (m *NormalizedSpan) XXX_Unmarshal(b []byte) error

type OperationAndMetadata

type OperationAndMetadata struct {
	Operation string
	Metadata  OperationMetadata
}

OperationAndMetadata contains information about a tracing span operation and its corresponding metadata.

type OperationMetadata

type OperationMetadata struct {
	// Duration represents the total time spent by spans tracing the operation.
	Duration time.Duration `protobuf:"varint,1,opt,name=duration,proto3,casttype=time.Duration" json:"duration,omitempty"`
	// Count represents the number of spans tracing the operation.
	Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// ContainsUnfinished is true if the OperationMetadata contains information
	// about unfinished spans tracing the operation.
	ContainsUnfinished bool `protobuf:"varint,3,opt,name=contains_unfinished,json=containsUnfinished,proto3" json:"contains_unfinished,omitempty"`
}

OperationMetadata captures information corresponding to the operation that a span is started with.

func (OperationMetadata) Combine

Combine returns the sum of m and other.

func (*OperationMetadata) Descriptor

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

func (*OperationMetadata) Marshal

func (m *OperationMetadata) Marshal() (dAtA []byte, err error)

func (*OperationMetadata) MarshalTo

func (m *OperationMetadata) MarshalTo(dAtA []byte) (int, error)

func (*OperationMetadata) MarshalToSizedBuffer

func (m *OperationMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OperationMetadata) ProtoMessage

func (*OperationMetadata) ProtoMessage()

func (*OperationMetadata) Reset

func (m *OperationMetadata) Reset()

func (OperationMetadata) SafeFormat

func (m OperationMetadata) SafeFormat(s redact.SafePrinter, _ rune)

SafeFormat implements redact.SafeFormatter.

func (*OperationMetadata) Size

func (m *OperationMetadata) Size() (n int)

func (OperationMetadata) String

func (m OperationMetadata) String() string

func (*OperationMetadata) Unmarshal

func (m *OperationMetadata) Unmarshal(dAtA []byte) error

func (*OperationMetadata) XXX_DiscardUnknown

func (m *OperationMetadata) XXX_DiscardUnknown()

func (*OperationMetadata) XXX_Marshal

func (m *OperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OperationMetadata) XXX_Merge

func (m *OperationMetadata) XXX_Merge(src proto.Message)

func (*OperationMetadata) XXX_Size

func (m *OperationMetadata) XXX_Size() int

func (*OperationMetadata) XXX_Unmarshal

func (m *OperationMetadata) XXX_Unmarshal(b []byte) error

type RecordedSpan

type RecordedSpan struct {
	// ID of the trace; spans that are part of the same hierarchy share
	// the same trace ID.
	TraceID TraceID `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"`
	// ID of the span.
	SpanID SpanID `protobuf:"varint,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"`
	// ID of the parent span.
	ParentSpanID SpanID `protobuf:"varint,3,opt,name=parent_span_id,json=parentSpanId,proto3,customtype=SpanID" json:"parent_span_id"`
	// Operation name.
	Operation string `protobuf:"bytes,4,opt,name=operation,proto3" json:"operation,omitempty"`
	// tag_groups describes tags associated with the span, potentially in a
	// shallow structured hierarchy.
	//
	// A span may have at most one "anonymous" tag group, that is, a tag group
	// without a Name. This is not enforced in the protobuf definition, but is
	// expected in code.
	//
	// The tags in an anonymous group are not necessarily related, and should
	// instead be treated as independent, top-level items. These tags are
	// stored in a tag group for convenience.
	TagGroups []TagGroup `protobuf:"bytes,18,rep,name=tag_groups,json=tagGroups,proto3" json:"tag_groups"`
	// Time when the span was started.
	StartTime time.Time `protobuf:"bytes,7,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// The span's duration, measured from start to Finish().
	//
	// A span whose recording is collected before it's finished will have the
	// duration set as the "time of collection - start time". Such a span will
	// have an "unfinished" tag and a `finished` boolean value of false in this
	// recording.
	Duration time.Duration `protobuf:"bytes,8,opt,name=duration,proto3,stdduration" json:"duration"`
	// Events logged in the span.
	Logs []LogRecord `protobuf:"bytes,9,rep,name=logs,proto3" json:"logs"`
	// verbose indicates whether the span was recording in verbose mode at the
	// time the recording was produced.
	//
	// This field is deprecated; it can be removed in 23.1. Use recording_mode
	// instead.
	Verbose bool `protobuf:"varint,16,opt,name=verbose,proto3" json:"verbose,omitempty"`
	// recording_mode indicates the recording mode of the span at the the
	// recording was produced.
	RecordingMode RecordingMode `` /* 154-byte string literal not displayed */
	// The ID of the goroutine on which the span was created.
	GoroutineID uint64 `protobuf:"varint,12,opt,name=goroutine_id,json=goroutineId,proto3" json:"goroutine_id,omitempty"`
	// True if the span has been Finish()ed, false otherwise.
	Finished bool `protobuf:"varint,13,opt,name=finished,proto3" json:"finished,omitempty"`
	// StructuredRecords contains StructuredRecord events recorded either in this
	// span, or in children spans that have finished while our span was not
	// recording verbosely.
	//
	// A StructuredRecord wraps the Payload with a RecordedAt timestamp to expose
	// information about when this event occurred.
	StructuredRecords []StructuredRecord `protobuf:"bytes,14,rep,name=structured_records,json=structuredRecords,proto3" json:"structured_records"`
	// structured_records_size_bytes represents the total size of the logs in
	// structured_records.
	StructuredRecordsSizeBytes int64 `` /* 145-byte string literal not displayed */
	// ChildrenMetadata is a mapping from operation to the aggregated metadata of
	// that operation.
	//
	// When a child of this span is Finish()ed, it updates the map with all the
	// children in its Recording. ChildrenMetadata therefore provides a bucketed
	// view of the various operations that are being traced as part of a span.
	ChildrenMetadata map[string]OperationMetadata `` /* 188-byte string literal not displayed */
}

RecordedSpan is the data recorded by a trace span. It needs to be able to cross RPC boundaries so that the complete recording of the trace can be constructed.

func (*RecordedSpan) AddStructuredRecord

func (s *RecordedSpan) AddStructuredRecord(r StructuredRecord) int64

AddStructuredRecord adds r to s' structured logs and returns r.MemorySize().

Note that the limit on the size of a span's structured records is not enforced here. If it's needed, the caller has to do it.

func (*RecordedSpan) Descriptor

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

func (*RecordedSpan) EnsureTagGroup

func (s *RecordedSpan) EnsureTagGroup(name string) *TagGroup

EnsureTagGroup returns a reference to the tag group with the given name, creating it if it doesn't exist.

func (*RecordedSpan) FindTagGroup

func (s *RecordedSpan) FindTagGroup(name string) *TagGroup

FindTagGroup returns the tag group matching the supplied name, or nil if the name is not found.

func (*RecordedSpan) Marshal

func (m *RecordedSpan) Marshal() (dAtA []byte, err error)

func (*RecordedSpan) MarshalTo

func (m *RecordedSpan) MarshalTo(dAtA []byte) (int, error)

func (*RecordedSpan) MarshalToSizedBuffer

func (m *RecordedSpan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RecordedSpan) ProtoMessage

func (*RecordedSpan) ProtoMessage()

func (*RecordedSpan) Reset

func (m *RecordedSpan) Reset()

func (*RecordedSpan) SafeFormat

func (s *RecordedSpan) SafeFormat(w redact.SafePrinter, _ rune)

SafeFormat implements redact.SafeFormatter.

func (*RecordedSpan) Size

func (m *RecordedSpan) Size() (n int)

func (*RecordedSpan) String

func (s *RecordedSpan) String() string

String implements fmt.Stringer.

func (*RecordedSpan) Structured

func (s *RecordedSpan) Structured(visit func(*types.Any, time.Time))

Structured visits the data passed to RecordStructured for the Span from which the RecordedSpan was created.

func (*RecordedSpan) TrimStructured

func (s *RecordedSpan) TrimStructured(maxSize int64) int64

TrimStructured potentially drops structured log records in order to keep the structured record size <= maxSize. The prefix of the records that sum up to <= maxSize is kept.

func (*RecordedSpan) Unmarshal

func (m *RecordedSpan) Unmarshal(dAtA []byte) error

func (*RecordedSpan) XXX_DiscardUnknown

func (m *RecordedSpan) XXX_DiscardUnknown()

func (*RecordedSpan) XXX_Marshal

func (m *RecordedSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RecordedSpan) XXX_Merge

func (m *RecordedSpan) XXX_Merge(src proto.Message)

func (*RecordedSpan) XXX_Size

func (m *RecordedSpan) XXX_Size() int

func (*RecordedSpan) XXX_Unmarshal

func (m *RecordedSpan) XXX_Unmarshal(b []byte) error

type Recording

type Recording []RecordedSpan

Recording represents a group of RecordedSpans rooted at a fixed root span, as returned by GetRecording. Spans are sorted by StartTime.

func (Recording) FindLogMessage

func (r Recording) FindLogMessage(pattern string) (string, bool)

FindLogMessage returns the first log message in the recording that matches the given regexp. The bool return value is true if such a message is found.

This method strips the redaction markers from all the log messages, which is pretty inefficient.

func (Recording) FindSpan

func (r Recording) FindSpan(operation string) (RecordedSpan, bool)

FindSpan returns the Span with the given operation. The bool retval is false if the Span is not found.

func (Recording) Len

func (r Recording) Len() int

Len implements sort.Interface.

func (Recording) Less

func (r Recording) Less(i, j int) bool

Less implements sort.Interface.

func (Recording) OrphanSpans

func (r Recording) OrphanSpans() []RecordedSpan

OrphanSpans returns the spans with parents missing from the recording.

func (Recording) SafeFormat

func (r Recording) SafeFormat(w redact.SafePrinter, _ rune)

SafeFormat implements the redact.SafeFormatter interface.

func (Recording) String

func (r Recording) String() string

String formats the given spans for human consumption, showing the relationship using nesting and times as both relative to the previous event and cumulative.

Child spans are inserted into the parent at the point of the child's StartTime; see the diagram on generateSessionTraceVTable() for the ordering of messages.

Each log line show the time since the beginning of the trace and since the previous log line. Span starts are shown with special "=== <operation>" lines. For a Span start, the time since the relative log line can be negative when the Span start follows a message from the parent that was generated after the child Span started (or even after the child finished).

TODO(andrei): this should be unified with SessionTracing.generateSessionTraceVTable().

func (Recording) Swap

func (r Recording) Swap(i, j int)

Swap implements sort.Interface.

func (Recording) ToJaegerJSON

func (r Recording) ToJaegerJSON(stmt, comment, nodeStr string) (string, error)

ToJaegerJSON returns the trace as a JSON that can be imported into Jaeger for visualization.

The format is described here: https://github.com/jaegertracing/jaeger-ui/issues/381#issuecomment-494150826

The statement is passed in so it can be included in the trace.

type RecordingMode

type RecordingMode int32
const (
	RecordingMode_OFF        RecordingMode = 0
	RecordingMode_VERBOSE    RecordingMode = 1
	RecordingMode_STRUCTURED RecordingMode = 2
)

func (RecordingMode) EnumDescriptor

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

func (RecordingMode) String

func (x RecordingMode) String() string

type RecordingType

type RecordingType int32

RecordingType is the type of recording that a Span might be performing.

const (
	// RecordingOff means that the Span discards events passed in.
	RecordingOff RecordingType = iota

	// RecordingStructured means that the Span discards events passed in through
	// Recordf(), but collects events passed in through RecordStructured(), as
	// well as information about child spans (their name, start and stop time).
	RecordingStructured

	// RecordingVerbose means that the Span collects events passed in through
	// Recordf() in its recording.
	RecordingVerbose
)

func RecordingTypeFromCarrierValue

func RecordingTypeFromCarrierValue(val string) RecordingType

RecordingTypeFromCarrierValue decodes a recording type carried by a carrier.

func RecordingTypeFromProto

func RecordingTypeFromProto(val RecordingMode) RecordingType

RecordingTypeFromProto converts from the proto values to the corresponding enum.

func (RecordingType) ToCarrierValue

func (t RecordingType) ToCarrierValue() string

ToCarrierValue encodes the RecordingType to be propagated through a carrier.

func (RecordingType) ToProto

func (t RecordingType) ToProto() RecordingMode

ToProto converts t to the corresponding proto enum.

type SpanID

type SpanID uint64

SpanID is a probabilistically-unique span id.

func (SpanID) SafeValue

func (SpanID) SafeValue()

type StructuredRecord

type StructuredRecord struct {
	// Time of the structured record.
	Time    time.Time  `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
	Payload *types.Any `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

StructuredRecord is a structured message recorded in a traced span.

func (*StructuredRecord) Descriptor

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

func (*StructuredRecord) Marshal

func (m *StructuredRecord) Marshal() (dAtA []byte, err error)

func (*StructuredRecord) MarshalTo

func (m *StructuredRecord) MarshalTo(dAtA []byte) (int, error)

func (*StructuredRecord) MarshalToSizedBuffer

func (m *StructuredRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StructuredRecord) MemorySize

func (r *StructuredRecord) MemorySize() int

MemorySize implements the sizable interface.

func (*StructuredRecord) ProtoMessage

func (*StructuredRecord) ProtoMessage()

func (*StructuredRecord) Reset

func (m *StructuredRecord) Reset()

func (*StructuredRecord) Size

func (m *StructuredRecord) Size() (n int)

func (*StructuredRecord) String

func (m *StructuredRecord) String() string

func (*StructuredRecord) Unmarshal

func (m *StructuredRecord) Unmarshal(dAtA []byte) error

func (*StructuredRecord) XXX_DiscardUnknown

func (m *StructuredRecord) XXX_DiscardUnknown()

func (*StructuredRecord) XXX_Marshal

func (m *StructuredRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StructuredRecord) XXX_Merge

func (m *StructuredRecord) XXX_Merge(src proto.Message)

func (*StructuredRecord) XXX_Size

func (m *StructuredRecord) XXX_Size() int

func (*StructuredRecord) XXX_Unmarshal

func (m *StructuredRecord) XXX_Unmarshal(b []byte) error

type Tag

type Tag struct {
	// key is the name of the tag. This is a safe value.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// value is the value of the tag. This is NOT a safe value.
	// It may contain PII or other sensitive information.
	// TODO(knz): we should deprecate this field, and define
	// a new value field with type RedactableString.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*Tag) Descriptor

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

func (*Tag) Marshal

func (m *Tag) Marshal() (dAtA []byte, err error)

func (*Tag) MarshalTo

func (m *Tag) MarshalTo(dAtA []byte) (int, error)

func (*Tag) MarshalToSizedBuffer

func (m *Tag) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) Reset

func (m *Tag) Reset()

func (*Tag) Size

func (m *Tag) Size() (n int)

func (*Tag) String

func (m *Tag) String() string

func (*Tag) Unmarshal

func (m *Tag) Unmarshal(dAtA []byte) error

func (*Tag) XXX_DiscardUnknown

func (m *Tag) XXX_DiscardUnknown()

func (*Tag) XXX_Marshal

func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tag) XXX_Merge

func (m *Tag) XXX_Merge(src proto.Message)

func (*Tag) XXX_Size

func (m *Tag) XXX_Size() int

func (*Tag) XXX_Unmarshal

func (m *Tag) XXX_Unmarshal(b []byte) error

type TagGroup

type TagGroup struct {
	// May be empty. If so, indicates that contained Tags should be treated as
	// top-level.
	//
	// If a value is instead present here, indicates that this group is a
	// structured collection of related tags.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Tags []Tag  `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags"`
}

func (*TagGroup) AddTag

func (tg *TagGroup) AddTag(k, v string)

AddTag adds a tag to the group. If a tag with the given key already exists, its value is updated.

func (*TagGroup) Descriptor

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

func (*TagGroup) FindTag

func (tg *TagGroup) FindTag(key string) (string, bool)

FindTag returns the value matching the supplied key, or nil if the key is not found.

func (*TagGroup) Marshal

func (m *TagGroup) Marshal() (dAtA []byte, err error)

func (*TagGroup) MarshalTo

func (m *TagGroup) MarshalTo(dAtA []byte) (int, error)

func (*TagGroup) MarshalToSizedBuffer

func (m *TagGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TagGroup) ProtoMessage

func (*TagGroup) ProtoMessage()

func (*TagGroup) Reset

func (m *TagGroup) Reset()

func (*TagGroup) Size

func (m *TagGroup) Size() (n int)

func (*TagGroup) String

func (m *TagGroup) String() string

func (*TagGroup) Unmarshal

func (m *TagGroup) Unmarshal(dAtA []byte) error

func (*TagGroup) XXX_DiscardUnknown

func (m *TagGroup) XXX_DiscardUnknown()

func (*TagGroup) XXX_Marshal

func (m *TagGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TagGroup) XXX_Merge

func (m *TagGroup) XXX_Merge(src proto.Message)

func (*TagGroup) XXX_Size

func (m *TagGroup) XXX_Size() int

func (*TagGroup) XXX_Unmarshal

func (m *TagGroup) XXX_Unmarshal(b []byte) error

type TraceCollection

type TraceCollection struct {
	// Comment is a dummy field we use to put instructions on how to load the trace.
	Comment string             `json:"_comment"`
	Data    []jaegerjson.Trace `json:"data"`
}

TraceCollection is the format accepted by the Jaegar upload feature, as per https://github.com/jaegertracing/jaeger-ui/issues/381#issuecomment-494150826

type TraceID

type TraceID uint64

TraceID is a probabilistically-unique id, shared by all spans in a trace.

func (TraceID) SafeValue

func (TraceID) SafeValue()

type TraceInfo

type TraceInfo struct {
	TraceID TraceID `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"`
	// ID of the parent span.
	ParentSpanID SpanID `protobuf:"varint,2,opt,name=parent_span_id,json=parentSpanId,proto3,customtype=SpanID" json:"parent_span_id"`
	// The type of recording, if any, that the parent span is doing. See
	// tracing.RecordingType.
	RecordingMode RecordingMode       `` /* 153-byte string literal not displayed */
	Otel          *TraceInfo_OtelInfo `protobuf:"bytes,4,opt,name=otel,proto3" json:"otel,omitempty"`
}

TraceInfo represents the tracing context of an operation. It is the proto representation of tracing.SpanMeta. TraceInfos are passed around in RPC payloads so that the server can create spans that are linked to the remote parent.

func (*TraceInfo) Descriptor

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

func (*TraceInfo) Empty

func (t *TraceInfo) Empty() bool

Empty returns true if t does not have any tracing info in it.

func (*TraceInfo) Marshal

func (m *TraceInfo) Marshal() (dAtA []byte, err error)

func (*TraceInfo) MarshalTo

func (m *TraceInfo) MarshalTo(dAtA []byte) (int, error)

func (*TraceInfo) MarshalToSizedBuffer

func (m *TraceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceInfo) ProtoMessage

func (*TraceInfo) ProtoMessage()

func (*TraceInfo) Reset

func (m *TraceInfo) Reset()

func (*TraceInfo) Size

func (m *TraceInfo) Size() (n int)

func (*TraceInfo) String

func (m *TraceInfo) String() string

func (*TraceInfo) Unmarshal

func (m *TraceInfo) Unmarshal(dAtA []byte) error

func (*TraceInfo) XXX_DiscardUnknown

func (m *TraceInfo) XXX_DiscardUnknown()

func (*TraceInfo) XXX_Marshal

func (m *TraceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceInfo) XXX_Merge

func (m *TraceInfo) XXX_Merge(src proto.Message)

func (*TraceInfo) XXX_Size

func (m *TraceInfo) XXX_Size() int

func (*TraceInfo) XXX_Unmarshal

func (m *TraceInfo) XXX_Unmarshal(b []byte) error

type TraceInfo_OtelInfo

type TraceInfo_OtelInfo struct {
	// trace_id will have exactly 16 bytes.
	TraceID []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	// span_id will have exactly 8 bytes.
	SpanID []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
}

OtelInfo contains the OpenTelemetry tracing context, if any.

func (*TraceInfo_OtelInfo) Descriptor

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

func (*TraceInfo_OtelInfo) Marshal

func (m *TraceInfo_OtelInfo) Marshal() (dAtA []byte, err error)

func (*TraceInfo_OtelInfo) MarshalTo

func (m *TraceInfo_OtelInfo) MarshalTo(dAtA []byte) (int, error)

func (*TraceInfo_OtelInfo) MarshalToSizedBuffer

func (m *TraceInfo_OtelInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceInfo_OtelInfo) ProtoMessage

func (*TraceInfo_OtelInfo) ProtoMessage()

func (*TraceInfo_OtelInfo) Reset

func (m *TraceInfo_OtelInfo) Reset()

func (*TraceInfo_OtelInfo) Size

func (m *TraceInfo_OtelInfo) Size() (n int)

func (*TraceInfo_OtelInfo) String

func (m *TraceInfo_OtelInfo) String() string

func (*TraceInfo_OtelInfo) Unmarshal

func (m *TraceInfo_OtelInfo) Unmarshal(dAtA []byte) error

func (*TraceInfo_OtelInfo) XXX_DiscardUnknown

func (m *TraceInfo_OtelInfo) XXX_DiscardUnknown()

func (*TraceInfo_OtelInfo) XXX_Marshal

func (m *TraceInfo_OtelInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceInfo_OtelInfo) XXX_Merge

func (m *TraceInfo_OtelInfo) XXX_Merge(src proto.Message)

func (*TraceInfo_OtelInfo) XXX_Size

func (m *TraceInfo_OtelInfo) XXX_Size() int

func (*TraceInfo_OtelInfo) XXX_Unmarshal

func (m *TraceInfo_OtelInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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