Documentation ¶
Index ¶
- Constants
- func ConvertNanoSecondsIntoProperTimeUnit(value int) string
- func ConvertTimeFieldIntoNanoSeconds(value string) int
- func CreateTraceID(id []byte) trace.TraceID
- func DecodeTraceID(id string) trace.TraceID
- type Attributes
- func (a Attributes) Delete(key string)
- func (a Attributes) Get(key string) string
- func (a Attributes) GetExists(key string) (string, bool)
- func (a Attributes) Len() int
- func (a Attributes) MarshalJSON() ([]byte, error)
- func (a Attributes) Set(key, value string)
- func (a Attributes) SetPointerValue(key string, value *string)
- func (a *Attributes) UnmarshalJSON(in []byte) error
- func (a Attributes) Values() map[string]string
- type ConversionConfig
- type HttpResourceSpans
- type Span
- type SpanEvent
- type SpanKind
- type SpanStatus
- type Spans
- type Trace
- func FromHttpOtelResourceSpans(resourceSpans []*HttpResourceSpans) Trace
- func FromOtel(input *v1.TracesData) Trace
- func FromOtelResourceSpans(resourceSpans []*v1.ResourceSpans) Trace
- func FromSpanList(input []*v1.Span) Trace
- func MergeTraces(traces ...*Trace) *Trace
- func NewTrace(traceID string, spans []Span) Trace
- type TraceRepository
Constants ¶
View Source
const ( TracetestMetadataFieldStartTime string = "tracetest.span.start_time" TracetestMetadataFieldEndTime string = "tracetest.span.end_time" TracetestMetadataFieldDuration string = "tracetest.span.duration" TracetestMetadataFieldType string = "tracetest.span.type" TracetestMetadataFieldName string = "tracetest.span.name" TracetestMetadataFieldParentID string = "tracetest.span.parent_id" TracetestMetadataFieldKind string = "tracetest.span.kind" TracetestMetadataFieldStatusCode string = "tracetest.span.status_code" TracetestMetadataFieldStatusDescription string = "tracetest.span.status_description" )
View Source
const ( NANOSECOND_SCALE = 0 MICROSECOND_SCALE = 1 MILLISECOND_SCALE = 2 SECOND_SCALE = 3 MINUTE_SCALE = 4 HOUR_SCALE = 5 )
View Source
const TemporaryRootSpanName = "Temporary Tracetest root span"
View Source
const TriggerSpanName = "Tracetest trigger"
Variables ¶
This section is empty.
Functions ¶
func CreateTraceID ¶
func DecodeTraceID ¶
Types ¶
type Attributes ¶
type Attributes struct {
// contains filtered or unexported fields
}
func NewAttributes ¶ added in v0.14.7
func NewAttributes(inputs ...map[string]string) Attributes
func (Attributes) Delete ¶ added in v0.14.7
func (a Attributes) Delete(key string)
func (Attributes) Get ¶
func (a Attributes) Get(key string) string
func (Attributes) GetExists ¶ added in v0.14.7
func (a Attributes) GetExists(key string) (string, bool)
func (Attributes) Len ¶ added in v0.14.7
func (a Attributes) Len() int
func (Attributes) MarshalJSON ¶ added in v0.14.7
func (a Attributes) MarshalJSON() ([]byte, error)
func (Attributes) Set ¶ added in v0.14.7
func (a Attributes) Set(key, value string)
func (Attributes) SetPointerValue ¶
func (a Attributes) SetPointerValue(key string, value *string)
func (*Attributes) UnmarshalJSON ¶ added in v0.14.7
func (a *Attributes) UnmarshalJSON(in []byte) error
func (Attributes) Values ¶ added in v0.14.7
func (a Attributes) Values() map[string]string
type ConversionConfig ¶
type ConversionConfig struct {
// contains filtered or unexported fields
}
func NewConversionConfig ¶
func NewConversionConfig() ConversionConfig
func (ConversionConfig) AddTimeFields ¶
func (c ConversionConfig) AddTimeFields(fields ...string)
func (ConversionConfig) IsTimeField ¶
func (c ConversionConfig) IsTimeField(field string) bool
type HttpResourceSpans ¶
type HttpResourceSpans struct { v1.ResourceSpans ScopeSpans []*httpScopeSpans `json:"scopeSpans"` InstrumentationLibrarySpans []*httpScopeSpans `json:"instrumentationLibrarySpans"` }
type Span ¶
type Span struct { ID trace.SpanID Name string StartTime time.Time EndTime time.Time Attributes Attributes Kind SpanKind Events []SpanEvent Status *SpanStatus Parent *Span `json:"-"` Children []*Span `json:"-"` }
func AugmentRootSpan ¶
func AugmentRootSpan(span Span, result trigger.TriggerResult) Span
func ConvertOtelSpanIntoSpan ¶
func (Span) MarshalJSON ¶
func (*Span) UnmarshalJSON ¶
type SpanEvent ¶
type SpanEvent struct { Name string `json:"name"` Timestamp time.Time `json:"timestamp"` Attributes Attributes `json:"attributes"` }
type SpanStatus ¶
type Trace ¶
func FromHttpOtelResourceSpans ¶
func FromHttpOtelResourceSpans(resourceSpans []*HttpResourceSpans) Trace
func FromOtel ¶
func FromOtel(input *v1.TracesData) Trace
func FromOtelResourceSpans ¶
func FromOtelResourceSpans(resourceSpans []*v1.ResourceSpans) Trace
func FromSpanList ¶
func MergeTraces ¶
func (*Trace) HasRootSpan ¶
func (*Trace) InsertRootSpan ¶
func (Trace) MarshalJSON ¶
func (*Trace) UnmarshalJSON ¶
type TraceRepository ¶
type TraceRepository struct {
// contains filtered or unexported fields
}
func NewTraceRepository ¶
func NewTraceRepository(db *sql.DB) *TraceRepository
func (*TraceRepository) UpdateTraceSpans ¶
func (r *TraceRepository) UpdateTraceSpans(ctx context.Context, trace *Trace) error
Click to show internal directories.
Click to hide internal directories.