Documentation ¶
Index ¶
- Variables
- type EventData
- type LinkData
- type LogData
- type MetricData
- type RecentSummaries
- type RecentTelemetrySummaries
- type ResourceData
- type ScopeData
- type SpanData
- type Store
- func (store *Store) AddLog(_ context.Context, ld LogData)
- func (store *Store) AddMetric(_ context.Context, md MetricData)
- func (store *Store) AddSpan(_ context.Context, spanData SpanData)
- func (store *Store) Clear()
- func (store *Store) GetRecentTelemetry(traceCount int) []TelemetryData
- func (store *Store) GetTelemetry(id string) (TelemetryData, error)
- type TelemetryData
- type TelemetrySummary
- type TraceData
- type TraceSummary
- type Unique
Constants ¶
This section is empty.
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 ¶
This section is empty.
Types ¶
type LogData ¶
type LogData struct { Body string `json:"body,omitempty"` TraceID string `json:"traceID,omitempty"` SpanID string `json:"spanID,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` ObservedTimestamp time.Time `json:"observedTimestamp,omitempty"` Attributes map[string]interface{} `json:"attributes,omitempty"` SeverityText string `json:"severityText,omitempty"` SeverityNumber plog.SeverityNumber `json:"severityNumber,omitempty"` DroppedAttributesCount uint32 `json:"droppedAttributeCount,omitempty"` Flags plog.LogRecordFlags `json:"flags,omitempty"` Resource *ResourceData `json:"resource"` Scope *ScopeData `json:"scope"` }
type MetricData ¶
type MetricData struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Unit string `json:"unit,omitempty"` Type pmetric.MetricType `json:"type,omitempty"` // add datapoints Resource *ResourceData `json:"resource"` Scope *ScopeData `json:"scope"` Received time.Time `json:"-"` }
func (MetricData) ID ¶
func (m MetricData) ID() string
type RecentSummaries ¶
type RecentSummaries struct {
TraceSummaries []TraceSummary `json:"traceSummaries"`
}
type RecentTelemetrySummaries ¶
type RecentTelemetrySummaries struct {
Summaries []TelemetrySummary `json:"summaries"`
}
type ResourceData ¶
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 (*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 Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewTelemetryStore ¶
func (*Store) GetRecentTelemetry ¶
func (store *Store) GetRecentTelemetry(traceCount int) []TelemetryData
func (*Store) GetTelemetry ¶
func (store *Store) GetTelemetry(id string) (TelemetryData, error)
type TelemetryData ¶
type TelemetryData struct { ID string `json:"ID"` Type string `json:"type"` Metric MetricData `json:"metric,omitempty"` Log LogData `json:"log,omitempty"` Trace TraceData `json:"trace,omitempty"` }
func (*TelemetryData) GetSummary ¶
func (t *TelemetryData) GetSummary() TelemetrySummary
type TelemetrySummary ¶
type TraceData ¶
func (*TraceData) GetTraceSummary ¶
func (trace *TraceData) GetTraceSummary() TraceSummary
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.