Documentation
¶
Overview ¶
Package analytics is Flowbot's personal and ops statistics module.
Index ¶
- Constants
- func OnService(fn func(*Service))
- func Register()
- type Service
- func (*Service) ActivityStats(ctx context.Context, uid string, since, until time.Time) (*types.ActivityStats, error)
- func (*Service) EventStats(ctx context.Context, uid string, since, until time.Time, groupBy string) (*types.EventStats, error)
- func (*Service) OpsRunsHealth(ctx context.Context, since, until time.Time, groupBy string) (pipe *types.PipelineStats, wf *types.WorkflowStats, fn *types.FunctionStats, ...)
- func (*Service) Overview(ctx context.Context, uid string, since, until time.Time, ...) (*types.AnalyticsOverview, error)
- func (*Service) TokenUsage(ctx context.Context, uid string, since, until time.Time, groupBy string) (*types.TokenUsageStats, error)
Constants ¶
View Source
const Name = "analytics"
Name is the module registry key.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service struct{}
Service orchestrates analytics queries across domain stores.
func ActiveService ¶
func ActiveService() *Service
ActiveService returns the current analytics service, or nil when disabled.
func (*Service) ActivityStats ¶
func (*Service) ActivityStats(ctx context.Context, uid string, since, until time.Time) (*types.ActivityStats, error)
ActivityStats returns personal pipeline/function run counts.
func (*Service) EventStats ¶
func (*Service) EventStats(ctx context.Context, uid string, since, until time.Time, groupBy string) (*types.EventStats, error)
EventStats proxies data_events aggregation for the signed-in user.
func (*Service) OpsRunsHealth ¶
func (*Service) OpsRunsHealth(ctx context.Context, since, until time.Time, groupBy string) ( pipe *types.PipelineStats, wf *types.WorkflowStats, fn *types.FunctionStats, err error, )
OpsRunsHealth returns site-wide pipeline, workflow, and function health stats.
Click to show internal directories.
Click to hide internal directories.