Documentation ¶
Index ¶
Constants ¶
View Source
const (
MAX_QUEUE_LENGTH = 10000
)
Variables ¶
View Source
var ErrEmptySpansSlice = errors.New("slice of spans associated with this traceID must not be empty")
View Source
var ErrTraceIDMismatch = errors.New("traceID mismatch between TraceStore.traceMap and TraceStore.traceQueue")
View Source
var ErrTraceIDNotFound = errors.New("traceID not found")
View Source
var WarningInvalidServiceName = errors.New("warning: Resource.Attributes['service.name'] must be a string value that helps to distinguish a group of services")
View Source
var WarningMissingRootSpan = errors.New("warning: trace is incomplete - no root span found")
Functions ¶
func NewFactory ¶
Types ¶
type Config ¶
type Config struct { // Endpoint defines where we serve our frontend app Endpoint string `mapstructure:"endpoint"` }
Config defines configuration for logging exporter.
type RecentSummaries ¶
type RecentSummaries struct {
TraceSummaries []TraceSummary `json:"traceSummaries"`
}
type ResourceData ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(traceStore *TraceStore, endpoint string) *Server
type SpanData ¶
type SpanData struct { TraceID string `json:"traceID"` TraceState string `json:"traceState"` SpanID string `json:"spanID"` ParentSpanID string `json:"parentSpanID"` Name string `json:"name"` Kind string `json:"kind"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Attributes map[string]interface{} `json:"attributes"` Events []EventData `json:"events"` Links []LinkData `json:"links"` Resource *ResourceData `json:"resource"` Scope *ScopeData `json:"scope"` DroppedAttributesCount uint32 `json:"droppedAttributesCount"` DroppedEventsCount uint32 `json:"droppedEventsCount"` DroppedLinksCount uint32 `json:"droppedLinksCount"` StatusCode string `json:"statusCode"` StatusMessage string `json:"statusMessage"` }
func GenerateSampleData ¶
func (*SpanData) GetServiceName ¶
Get the service name of a span with respect to OTEL semanic conventions: service.name must be a string value having a meaning that helps to distinguish a group of services. Read more here: (https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/#service)
type TraceData ¶
func (*TraceData) GetTraceSummary ¶
func (trace *TraceData) GetTraceSummary() TraceSummary
type TraceStore ¶
type TraceStore struct {
// contains filtered or unexported fields
}
func NewTraceStore ¶
func NewTraceStore(maxQueueSize int) *TraceStore
func (*TraceStore) GetRecentTraces ¶
func (store *TraceStore) GetRecentTraces(traceCount int) []TraceData
type TraceSummary ¶
type TraceSummary struct { HasRootSpan bool `json:"hasRootSpan"` RootServiceName string `json:"rootServiceName"` RootName string `json:"rootName"` RootStartTime time.Time `json:"rootStartTime"` RootEndTime time.Time `json:"rootEndTime"` SpanCount uint32 `json:"spanCount"` TraceID string `json:"traceID"` }
Click to show internal directories.
Click to hide internal directories.