Documentation
¶
Index ¶
- Variables
- func InitTracer(ctx context.Context, cfg config.OTelConfig) (func(context.Context) error, error)
- type ConfigStore
- type DataPlane
- type DeployEvent
- type DeployFilter
- type LatencyPercentiles
- type MetricReader
- type MetricWriter
- type ObservedEdge
- type PreferenceStore
- type RequestEntry
- type RequestFilter
- type RequestReader
- type RequestWriter
- type SLOAlert
- type SLORuleChange
- type SLOStatus
- type SLOStore
- type SLOWindowStatus
- type SavedView
- type ServiceEntry
- type ServiceMetrics
- type Span
- type TimelineSpan
- type TopologyGraph
- type TopologyNode
- type TopologyStore
- type TraceContext
- type TraceFilter
- type TraceReader
- type TraceSummary
- type TraceWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func InitTracer ¶
InitTracer sets up the OTel trace provider for production mode. Returns a shutdown function that flushes pending spans.
Types ¶
type ConfigStore ¶
type ConfigStore interface {
GetConfig(ctx context.Context) (*config.Config, error)
SetConfig(ctx context.Context, cfg *config.Config) error
ListDeploys(ctx context.Context, filter DeployFilter) ([]DeployEvent, error)
AddDeploy(ctx context.Context, deploy DeployEvent) error
ListViews(ctx context.Context) ([]SavedView, error)
SaveView(ctx context.Context, view SavedView) error
DeleteView(ctx context.Context, id string) error
ListServices(ctx context.Context) ([]ServiceEntry, error)
UpsertService(ctx context.Context, svc ServiceEntry) error
}
type DataPlane ¶
type DataPlane struct {
Traces TraceReader
TraceW TraceWriter
Requests RequestReader
RequestW RequestWriter
Metrics MetricReader
MetricW MetricWriter
SLO SLOStore
Config ConfigStore
Topology TopologyStore
Preferences PreferenceStore
Mode string
}
type DeployEvent ¶
type DeployFilter ¶
type LatencyPercentiles ¶
type MetricReader ¶
type MetricWriter ¶
type ObservedEdge ¶
type PreferenceStore ¶
type PreferenceStore interface {
Get(ctx context.Context, namespace, key string) (json.RawMessage, error)
Set(ctx context.Context, namespace, key string, value json.RawMessage) error
Delete(ctx context.Context, namespace, key string) error
ListByNamespace(ctx context.Context, namespace string) (map[string]json.RawMessage, error)
}
PreferenceStore provides backend-persisted key-value storage for user preferences, replacing frontend localStorage/sessionStorage.
type RequestEntry ¶
type RequestEntry struct {
ID string
TraceID string
SpanID string
Timestamp time.Time
Service string
Action string
Method string
Path string
StatusCode int
Latency time.Duration
LatencyMs float64
CallerID string
Error string
Level string
MemAllocKB float64
Goroutines int
RequestHeaders map[string]string
RequestBody string
ResponseBody string
TenantID string
OrgID string
UserID string
}
type RequestFilter ¶
type RequestReader ¶
type RequestReader interface {
Query(ctx context.Context, filter RequestFilter) ([]RequestEntry, error)
GetByID(ctx context.Context, id string) (*RequestEntry, error)
}
type RequestWriter ¶
type RequestWriter interface {
Write(ctx context.Context, entry RequestEntry) error
}
type SLORuleChange ¶
type SLOStatus ¶
type SLOStatus struct {
Windows []SLOWindowStatus
Healthy bool
Alerts []SLOAlert
}
type SLOWindowStatus ¶
type ServiceEntry ¶
type ServiceMetrics ¶
type Span ¶
type Span struct {
TraceID string
SpanID string
ParentSpanID string
Service string
Action string
Method string
Path string
StartTime time.Time
EndTime time.Time
DurationNs uint64
StatusCode int
Error string
TenantID string
OrgID string
UserID string
MemAllocKB float64
Goroutines uint32
Metadata map[string]string
ReqHeaders map[string]string
ReqBody string
RespBody string
}
type TimelineSpan ¶
type TopologyGraph ¶
type TopologyGraph struct {
Nodes []TopologyNode
Edges []ObservedEdge
}
type TopologyNode ¶
type TopologyStore ¶
type TraceContext ¶
type TraceFilter ¶
type TraceReader ¶
type TraceReader interface {
Get(ctx context.Context, traceID string) (*TraceContext, error)
Search(ctx context.Context, filter TraceFilter) ([]TraceSummary, error)
Timeline(ctx context.Context, traceID string) ([]TimelineSpan, error)
}
type TraceSummary ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.