observerdb

package
v0.24.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBatchAlreadyClosed = errors.New("batch already closed")
)

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
	SendBatch(context.Context, *pgx.Batch) pgx.BatchResults
}

type InsertFileEventsParams

type InsertFileEventsParams struct {
	TenantNamespace   string    `json:"tenant_namespace"`
	AgentName         string    `json:"agent_name"`
	EventTime         time.Time `json:"event_time"`
	PodNamespace      string    `json:"pod_namespace"`
	PodName           string    `json:"pod_name"`
	FilePathAccessed  string    `json:"file_path_accessed"`
	Process           string    `json:"process"`
	CommandInvocation string    `json:"command_invocation"`
	Action            string    `json:"action"`
	Source            string    `json:"source"`
}

type InsertMCPToolInvocationBatchResults

type InsertMCPToolInvocationBatchResults struct {
	// contains filtered or unexported fields
}

func (*InsertMCPToolInvocationBatchResults) Close

func (*InsertMCPToolInvocationBatchResults) Exec

func (b *InsertMCPToolInvocationBatchResults) Exec(f func(int, error))

type InsertMCPToolInvocationParams

type InsertMCPToolInvocationParams struct {
	TenantNamespace   string    `json:"tenant_namespace"`
	AgentName         string    `json:"agent_name"`
	TraceID           []byte    `json:"trace_id"`
	SpanID            []byte    `json:"span_id"`
	StartTime         time.Time `json:"start_time"`
	EndTime           time.Time `json:"end_time"`
	DurationNs        int64     `json:"duration_ns"`
	McpConnectionName string    `json:"mcp_connection_name"`
	ToolName          string    `json:"tool_name"`
	SessionID         string    `json:"session_id"`
	Failed            bool      `json:"failed"`
}

type InsertNetworkEventsParams

type InsertNetworkEventsParams struct {
	TenantNamespace   string    `json:"tenant_namespace"`
	AgentName         string    `json:"agent_name"`
	EventTime         time.Time `json:"event_time"`
	PodNamespace      string    `json:"pod_namespace"`
	PodName           string    `json:"pod_name"`
	DestinationDomain string    `json:"destination_domain"`
	DestinationIp     string    `json:"destination_ip"`
	DestinationPort   int64     `json:"destination_port"`
	Protocol          string    `json:"protocol"`
	Action            string    `json:"action"`
	Source            string    `json:"source"`
}

type InsertProcessEventsParams

type InsertProcessEventsParams struct {
	TenantNamespace   string    `json:"tenant_namespace"`
	AgentName         string    `json:"agent_name"`
	EventTime         time.Time `json:"event_time"`
	PodNamespace      string    `json:"pod_namespace"`
	PodName           string    `json:"pod_name"`
	Process           string    `json:"process"`
	ParentProcess     string    `json:"parent_process"`
	CommandInvocation string    `json:"command_invocation"`
	Action            string    `json:"action"`
	Source            string    `json:"source"`
}

type InsertTraceSpanBatchResults

type InsertTraceSpanBatchResults struct {
	// contains filtered or unexported fields
}

func (*InsertTraceSpanBatchResults) Close

func (*InsertTraceSpanBatchResults) Exec

func (b *InsertTraceSpanBatchResults) Exec(f func(int, error))

type InsertTraceSpanParams

type InsertTraceSpanParams struct {
	TenantNamespace    string    `json:"tenant_namespace"`
	AgentName          string    `json:"agent_name"`
	SessionID          string    `json:"session_id"`
	TraceID            []byte    `json:"trace_id"`
	SpanID             []byte    `json:"span_id"`
	ParentSpanID       []byte    `json:"parent_span_id"`
	StartTime          time.Time `json:"start_time"`
	EndTime            time.Time `json:"end_time"`
	DurationNs         int64     `json:"duration_ns"`
	Name               string    `json:"name"`
	SpanClass          string    `json:"span_class"`
	OperationName      string    `json:"operation_name"`
	Kind               string    `json:"kind"`
	StatusCode         string    `json:"status_code"`
	ErrorType          string    `json:"error_type"`
	ErrorMessage       string    `json:"error_message"`
	Model              string    `json:"model"`
	ToolName           string    `json:"tool_name"`
	InputTokens        int64     `json:"input_tokens"`
	OutputTokens       int64     `json:"output_tokens"`
	CachedInputTokens  int64     `json:"cached_input_tokens"`
	CachedWriteTokens  int64     `json:"cached_write_tokens"`
	CostUsd            float64   `json:"cost_usd"`
	LlmFinishReason    string    `json:"llm_finish_reason"`
	ResourceAttributes []byte    `json:"resource_attributes"`
	SpanAttributes     []byte    `json:"span_attributes"`
}

type InsertTraceSpanPayloadBatchResults

type InsertTraceSpanPayloadBatchResults struct {
	// contains filtered or unexported fields
}

func (*InsertTraceSpanPayloadBatchResults) Close

func (*InsertTraceSpanPayloadBatchResults) Exec

func (b *InsertTraceSpanPayloadBatchResults) Exec(f func(int, error))

type InsertTraceSpanPayloadParams

type InsertTraceSpanPayloadParams struct {
	TraceID        []byte    `json:"trace_id"`
	SpanID         []byte    `json:"span_id"`
	StartTime      time.Time `json:"start_time"`
	InputMessages  []byte    `json:"input_messages"`
	OutputMessages []byte    `json:"output_messages"`
	ToolArguments  []byte    `json:"tool_arguments"`
	ToolResult     []byte    `json:"tool_result"`
}

type Querier

type Querier interface {
	InsertFileEvents(ctx context.Context, arg []InsertFileEventsParams) (int64, error)
	InsertMCPToolInvocation(ctx context.Context, arg []InsertMCPToolInvocationParams) *InsertMCPToolInvocationBatchResults
	InsertNetworkEvents(ctx context.Context, arg []InsertNetworkEventsParams) (int64, error)
	InsertProcessEvents(ctx context.Context, arg []InsertProcessEventsParams) (int64, error)
	InsertTraceSpan(ctx context.Context, arg []InsertTraceSpanParams) *InsertTraceSpanBatchResults
	InsertTraceSpanPayload(ctx context.Context, arg []InsertTraceSpanPayloadParams) *InsertTraceSpanPayloadBatchResults
	RefreshTraceSessionSummary(ctx context.Context, arg []RefreshTraceSessionSummaryParams) *RefreshTraceSessionSummaryBatchResults
	RefreshTraceSummary(ctx context.Context, traceID [][]byte) *RefreshTraceSummaryBatchResults
	UpsertMCPToolLastCalled(ctx context.Context, arg []UpsertMCPToolLastCalledParams) *UpsertMCPToolLastCalledBatchResults
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) InsertFileEvents

func (q *Queries) InsertFileEvents(ctx context.Context, arg []InsertFileEventsParams) (int64, error)

func (*Queries) InsertNetworkEvents

func (q *Queries) InsertNetworkEvents(ctx context.Context, arg []InsertNetworkEventsParams) (int64, error)

func (*Queries) InsertProcessEvents

func (q *Queries) InsertProcessEvents(ctx context.Context, arg []InsertProcessEventsParams) (int64, error)

func (*Queries) InsertTraceSpan

func (*Queries) RefreshTraceSummary

func (q *Queries) RefreshTraceSummary(ctx context.Context, traceID [][]byte) *RefreshTraceSummaryBatchResults

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RefreshTraceSessionSummaryBatchResults

type RefreshTraceSessionSummaryBatchResults struct {
	// contains filtered or unexported fields
}

func (*RefreshTraceSessionSummaryBatchResults) Close

func (*RefreshTraceSessionSummaryBatchResults) Exec

type RefreshTraceSessionSummaryParams

type RefreshTraceSessionSummaryParams struct {
	SessionID string `json:"session_id"`
	TraceID   []byte `json:"trace_id"`
}

type RefreshTraceSummaryBatchResults

type RefreshTraceSummaryBatchResults struct {
	// contains filtered or unexported fields
}

func (*RefreshTraceSummaryBatchResults) Close

func (*RefreshTraceSummaryBatchResults) Exec

func (b *RefreshTraceSummaryBatchResults) Exec(f func(int, error))

type UpsertMCPToolLastCalledBatchResults

type UpsertMCPToolLastCalledBatchResults struct {
	// contains filtered or unexported fields
}

func (*UpsertMCPToolLastCalledBatchResults) Close

func (*UpsertMCPToolLastCalledBatchResults) Exec

func (b *UpsertMCPToolLastCalledBatchResults) Exec(f func(int, error))

type UpsertMCPToolLastCalledParams

type UpsertMCPToolLastCalledParams struct {
	TenantNamespace   string    `json:"tenant_namespace"`
	AgentName         string    `json:"agent_name"`
	McpConnectionName string    `json:"mcp_connection_name"`
	ToolName          string    `json:"tool_name"`
	LastCalledAt      time.Time `json:"last_called_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL