Documentation
¶
Index ¶
- Constants
- type RequestFilter
- type RequestPage
- type RequestRecord
- type RequestSummary
- type Store
- func (s *Store) Add(ctx context.Context, record RequestRecord) error
- func (s *Store) Cleanup(ctx context.Context, retentionDays int) (int64, error)
- func (s *Store) Close() error
- func (s *Store) DeleteAll(ctx context.Context) error
- func (s *Store) GetRequest(ctx context.Context, id string) (RequestRecord, error)
- func (s *Store) GetTrace(ctx context.Context, traceID string) (TraceRecord, []RequestRecord, error)
- func (s *Store) ListRequests(ctx context.Context, filter RequestFilter) (RequestPage, error)
- func (s *Store) ListTraces(ctx context.Context, filter RequestFilter) (TracePage, error)
- func (s *Store) Path() string
- type TracePage
- type TraceRecord
Constants ¶
View Source
const ( DirName = "observability" DatabaseFile = "observability.db" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestFilter ¶
type RequestPage ¶
type RequestPage struct {
Items []RequestRecord
Total int64
Summary RequestSummary
}
type RequestRecord ¶
type RequestRecord struct {
ID string
TraceID string
ThreadID string
StartedAt time.Time
CompletedAt time.Time
Method string
Path string
Protocol string
Status string
StatusCode int
Stream bool
Model string
Source string
SourceType string
SourceName string
APIKeyID string
APIKeyName string
PoolID string
PoolName string
PoolModel string
MemberModel string
FallbackCount int64
LimitedCount int64
InputTokens int64
OutputTokens int64
CacheReadInputTokens int64
CacheCreationTokens int64
CacheEligibleTokens int64
DurationMS int64
FirstTokenLatencyMS int64
ErrorMessage string
RequestBody string
ResponseBody string
RequestBodyTruncated bool
ResponseBodyTruncated bool
}
type RequestSummary ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetRequest ¶
func (*Store) GetTrace ¶
func (s *Store) GetTrace(ctx context.Context, traceID string) (TraceRecord, []RequestRecord, error)
func (*Store) ListRequests ¶
func (s *Store) ListRequests(ctx context.Context, filter RequestFilter) (RequestPage, error)
func (*Store) ListTraces ¶
type TracePage ¶
type TracePage struct {
Items []TraceRecord
Total int64
}
Click to show internal directories.
Click to hide internal directories.