controllers

package
v1.7.24 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AiTraceController = aiTraceController{}
View Source
var AuthController = authController{}
View Source
var DashboardController = dashboardController{}
View Source
var DistributedTraceController = distributedTraceController{}
View Source
var EndpointController = endpointController{}
View Source
var EndpointDetailController = endpointDetailController{}
View Source
var ExceptionStackTraceController = exceptionStackTraceController{}
View Source
var ExtensionRoutes []func(router *gin.RouterGroup)
View Source
var InvitationController = invitationController{}
View Source
var LogController = logController{}
View Source
var MemberController = memberController{}
View Source
var MetricQueryController = metricQueryController{}
View Source
var MetricRecordController = metricRecordController{}
View Source
var MetricsController = metricsController{}
View Source
var NotificationChannelController = notificationChannelController{}
View Source
var NotificationHistoryController = notificationHistoryController{}
View Source
var NotificationRuleController = notificationRuleController{}
View Source
var OAuthController = oauthController{}
View Source
var OrganizationController = organizationController{}
View Source
var PasswordResetController = passwordResetController{}
View Source
var PostRegistrationHooks []func(tx *sql.Tx, org *models.Organization, user *models.User) error
View Source
var ProjectController = projectController{}
View Source
var SessionController = sessionController{}
View Source
var SessionDetailController = sessionDetailController{}
View Source
var SourceMapController = sourceMapController{}
View Source
var TaskController = taskController{}
View Source
var TaskDetailController = taskDetailController{}
View Source
var WidgetController = widgetController{}
View Source
var WidgetGroupController = widgetGroupController{}

Functions

func RegisterControllers

func RegisterControllers(router *gin.RouterGroup)

Types

type AddWidgetRequest

type AddWidgetRequest struct {
	Title      string          `json:"title"`
	WidgetType string          `json:"widgetType" binding:"required"`
	Config     json.RawMessage `json:"config"`
}

type AiTraceDetailResponse

type AiTraceDetailResponse struct {
	AiTrace      *models.AiTrace `json:"aiTrace"`
	Conversation json.RawMessage `json:"conversation,omitempty"`
}

type AiTraceInstancesRequest

type AiTraceInstancesRequest struct {
	FromDate      time.Time        `json:"fromDate"`
	ToDate        time.Time        `json:"toDate"`
	OrderBy       string           `json:"orderBy"`
	SortDirection string           `json:"sortDirection"`
	Pagination    PaginationParams `json:"pagination"`
}

type AiTraceInstancesResponse

type AiTraceInstancesResponse struct {
	Data       []models.AiTrace           `json:"data"`
	Stats      *models.AiTraceDetailStats `json:"stats"`
	Pagination Pagination                 `json:"pagination"`
}

type AiTraceSearchRequest

type AiTraceSearchRequest struct {
	FromDate      time.Time        `json:"fromDate"`
	ToDate        time.Time        `json:"toDate"`
	OrderBy       string           `json:"orderBy"`
	SortDirection string           `json:"sortDirection"`
	Pagination    PaginationParams `json:"pagination"`
	Search        string           `json:"search"`
}

type ApplicationMetricsResponse

type ApplicationMetricsResponse struct {
	Metrics          []models.DashboardMetric `json:"metrics"`
	AvailableServers []string                 `json:"availableServers"`
	LastUpdated      time.Time                `json:"lastUpdated"`
}

Response types for split endpoints

type ArchiveRequest

type ArchiveRequest struct {
	Hashes []string `json:"hashes"`
}

type CreateProjectRequest

type CreateProjectRequest struct {
	Name      string `json:"name" binding:"required"`
	Framework string `json:"framework" binding:"required"`
}

type CreateWidgetGroupRequest

type CreateWidgetGroupRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type DashboardOverviewResponse

type DashboardOverviewResponse struct {
	RecentIssues   []models.ExceptionGroup `json:"recentIssues"`
	WorstEndpoints []models.EndpointStats  `json:"worstEndpoints"`
	HasData        bool                    `json:"hasData"`
}

type DeleteProjectRequest added in v1.7.22

type DeleteProjectRequest struct {
	Name string `json:"name" binding:"required"`
}

type DiscoverResponse

type DiscoverResponse struct {
	Metrics []models.DiscoveredMetric `json:"metrics"`
}

type DistributedTraceNode

type DistributedTraceNode struct {
	ProjectId   uuid.UUID              `json:"projectId"`
	ProjectName string                 `json:"projectName"`
	TraceType   string                 `json:"traceType"`
	Endpoint    *models.Endpoint       `json:"endpoint,omitempty"`
	Task        *models.Task           `json:"task,omitempty"`
	Spans       []models.Span          `json:"spans"`
	Exception   *EndpointExceptionInfo `json:"exception,omitempty"`
}

type DistributedTraceResponse

type DistributedTraceResponse struct {
	DistributedTraceId string                 `json:"distributedTraceId"`
	Nodes              []DistributedTraceNode `json:"nodes"`
}

type EndpointDetailResponse

type EndpointDetailResponse struct {
	Endpoint  *models.Endpoint       `json:"endpoint"`
	Spans     []models.Span          `json:"spans"`
	HasSpans  bool                   `json:"hasSpans"`
	Exception *EndpointExceptionInfo `json:"exception,omitempty"`
	Messages  []EndpointMessageInfo  `json:"messages"`
}

type EndpointExceptionInfo

type EndpointExceptionInfo struct {
	ExceptionHash string `json:"exceptionHash"`
	StackTrace    string `json:"stackTrace"`
	RecordedAt    string `json:"recordedAt"`
}

type EndpointInstancesRequest

type EndpointInstancesRequest struct {
	FromDate      time.Time        `json:"fromDate"`
	ToDate        time.Time        `json:"toDate"`
	OrderBy       string           `json:"orderBy"`
	SortDirection string           `json:"sortDirection"`
	Pagination    PaginationParams `json:"pagination"`
}

type EndpointInstancesResponse

type EndpointInstancesResponse struct {
	Data       []models.Endpoint           `json:"data"`
	Stats      *models.EndpointDetailStats `json:"stats"`
	Pagination Pagination                  `json:"pagination"`
}

type EndpointMessageInfo

type EndpointMessageInfo struct {
	Id            uuid.UUID         `json:"id"`
	ExceptionHash string            `json:"exceptionHash"`
	StackTrace    string            `json:"stackTrace"`
	RecordedAt    string            `json:"recordedAt"`
	Attributes    map[string]string `json:"attributes,omitempty"`
}

type EndpointSearchRequest

type EndpointSearchRequest struct {
	FromDate      time.Time        `json:"fromDate"`
	ToDate        time.Time        `json:"toDate"`
	OrderBy       string           `json:"orderBy"`
	SortDirection string           `json:"sortDirection"`
	Pagination    PaginationParams `json:"pagination"`
	Search        string           `json:"search"`
}

type EndpointStackedChartRequest

type EndpointStackedChartRequest struct {
	FromDate        time.Time `json:"fromDate"`
	ToDate          time.Time `json:"toDate"`
	MetricType      string    `json:"metricType"`      // total_time, p50, p95, p99
	IntervalMinutes int       `json:"intervalMinutes"` // bucket size
}

type ExceptionDetailRequest

type ExceptionDetailRequest struct {
	Pagination PaginationParams `json:"pagination"`
}

type ExceptionDetailResponse

type ExceptionDetailResponse struct {
	Group            *models.ExceptionGroup       `json:"group"`
	Occurrences      []models.ExceptionStackTrace `json:"occurrences"`
	Pagination       Pagination                   `json:"pagination"`
	SessionRecording json.RawMessage              `json:"sessionRecording,omitempty"`
	// SessionId is set when the exception is linked to a parent session row
	// (always-on recording). The frontend swaps SessionRecording for a fetch
	// against `/sessions/:sessionId/recording`, which spans every segment.
	SessionId *uuid.UUID `json:"sessionId,omitempty"`
}

type ExceptionSearchRequest

type ExceptionSearchRequest struct {
	FromDate        time.Time        `json:"fromDate"`
	ToDate          time.Time        `json:"toDate"`
	OrderBy         string           `json:"orderBy"`
	Pagination      PaginationParams `json:"pagination"`
	Search          string           `json:"search"`
	SearchType      string           `json:"searchType"`
	IncludeArchived bool             `json:"includeArchived"`
}

type HomepageStatsResponse

type HomepageStatsResponse struct {
	Requests    StatsComparison `json:"requests"`
	Exceptions  StatsComparison `json:"exceptions"`
	MemoryUsage StatsComparison `json:"memoryUsage"`
	CpuUsage    StatsComparison `json:"cpuUsage"`
}

type LogAttributeFilterRequest

type LogAttributeFilterRequest struct {
	Scope string `json:"scope"` // "resource" | "scope" | "log"
	Key   string `json:"key"`
	Value string `json:"value"`
}

type LogSearchRequest

type LogSearchRequest struct {
	FromDate           time.Time                   `json:"fromDate"`
	ToDate             time.Time                   `json:"toDate"`
	OrderBy            string                      `json:"orderBy"`
	SortDirection      string                      `json:"sortDirection"`
	Search             string                      `json:"search"`
	SearchType         string                      `json:"searchType"`
	MinSeverity        uint8                       `json:"minSeverity"`
	ServiceName        string                      `json:"serviceName"`
	TraceId            string                      `json:"traceId"`
	DistributedTraceId string                      `json:"distributedTraceId"`
	ExcludeTraceId     string                      `json:"excludeTraceId"`
	AttributeFilters   []LogAttributeFilterRequest `json:"attributeFilters"`
	Pagination         PaginationParams            `json:"pagination"`
}

type MetricQueryItem

type MetricQueryItem struct {
	Name        string            `json:"name" binding:"required"`
	Aggregation string            `json:"aggregation"`
	TagFilters  map[string]string `json:"tagFilters"`
	GroupBy     string            `json:"groupBy"`
}

type MetricQueryRequest

type MetricQueryRequest struct {
	Queries         []MetricQueryItem `json:"queries" binding:"required,min=1"`
	From            time.Time         `json:"from" binding:"required"`
	To              time.Time         `json:"to" binding:"required"`
	IntervalMinutes int               `json:"intervalMinutes"`
}

type MetricQueryResponse

type MetricQueryResponse struct {
	Results []MetricQueryResult `json:"results"`
}

type MetricQueryResult

type MetricQueryResult struct {
	Name   string                              `json:"name"`
	Unit   string                              `json:"unit"`
	Series map[string][]models.TimeSeriesPoint `json:"series"`
}

type MoveWidgetRequest

type MoveWidgetRequest struct {
	Offset int `json:"offset" binding:"required"`
}

type NotificationHistorySearchRequest

type NotificationHistorySearchRequest struct {
	Pagination PaginationParams `json:"pagination"`
	Search     string           `json:"search"`
	FromDate   string           `json:"fromDate"`
	ToDate     string           `json:"toDate"`
}

type PaginatedResponse

type PaginatedResponse[T any] struct {
	Data       []T        `json:"data"`
	Pagination Pagination `json:"pagination"`
}

type Pagination

type Pagination struct {
	Page       int   `json:"page"`
	PageSize   int   `json:"pageSize"`
	Total      int64 `json:"total"`
	TotalPages int64 `json:"totalPages"`
}

type PaginationParams

type PaginationParams struct {
	Page     int `json:"page" binding:"min=1"`
	PageSize int `json:"pageSize" binding:"min=1,max=100"`
}

type ServerMetricsResponse

type ServerMetricsResponse struct {
	Metrics          []models.DashboardMetric `json:"metrics"`
	AvailableServers []string                 `json:"availableServers"`
	LastUpdated      time.Time                `json:"lastUpdated"`
}

type SessionAttributeFilter

type SessionAttributeFilter struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type SessionDetailResponse

type SessionDetailResponse struct {
	Session    *models.Session        `json:"session"`
	Exceptions []SessionExceptionInfo `json:"exceptions"`
}

type SessionExceptionInfo

type SessionExceptionInfo struct {
	Id            uuid.UUID `json:"id"`
	ExceptionHash string    `json:"exceptionHash"`
	StackTrace    string    `json:"stackTrace"`
	RecordedAt    string    `json:"recordedAt"`
	IsMessage     bool      `json:"isMessage"`
}

type SessionRecordingPayload

type SessionRecordingPayload struct {
	Events    []json.RawMessage `json:"events"`
	Logs      []json.RawMessage `json:"logs,omitempty"`
	Actions   []json.RawMessage `json:"actions,omitempty"`
	StartedAt *time.Time        `json:"startedAt,omitempty"`
	EndedAt   *time.Time        `json:"endedAt,omitempty"`
}

SessionRecordingPayload is the shape consumed by the frontend SessionReplay component. We concatenate rrweb event arrays from every segment ordered by segment_index, plus union the optional logs/actions arrays. Logs/actions are kept as raw JSON since the backend never inspects them.

type SessionSearchRequest

type SessionSearchRequest struct {
	FromDate         time.Time                `json:"fromDate"`
	ToDate           time.Time                `json:"toDate"`
	OrderBy          string                   `json:"orderBy"`
	SortDirection    string                   `json:"sortDirection"`
	Search           string                   `json:"search"`
	AttributeFilters []SessionAttributeFilter `json:"attributeFilters"`
	Pagination       PaginationParams         `json:"pagination"`
}

type SetSlowEndpointRequest

type SetSlowEndpointRequest struct {
	Endpoint string `json:"endpoint" binding:"required"`
	OffsetMs uint32 `json:"offsetMs"`
	Reason   string `json:"reason"`
}

type StatsComparison

type StatsComparison struct {
	Current       float64 `json:"current"`
	Previous      float64 `json:"previous"`
	PercentChange float64 `json:"percentChange"`
}

type StatsMetricsResponse

type StatsMetricsResponse struct {
	Metrics     []models.DashboardMetric `json:"metrics"`
	LastUpdated time.Time                `json:"lastUpdated"`
}

type TaskDetailResponse

type TaskDetailResponse struct {
	Task      *models.Task       `json:"task"`
	Spans     []models.Span      `json:"spans"`
	HasSpans  bool               `json:"hasSpans"`
	Exception *TaskExceptionInfo `json:"exception,omitempty"`
	Messages  []TaskMessageInfo  `json:"messages"`
}

type TaskExceptionInfo

type TaskExceptionInfo struct {
	ExceptionHash string `json:"exceptionHash"`
	StackTrace    string `json:"stackTrace"`
	RecordedAt    string `json:"recordedAt"`
}

type TaskInstancesRequest

type TaskInstancesRequest struct {
	FromDate      time.Time        `json:"fromDate"`
	ToDate        time.Time        `json:"toDate"`
	OrderBy       string           `json:"orderBy"`
	SortDirection string           `json:"sortDirection"`
	Pagination    PaginationParams `json:"pagination"`
}

type TaskInstancesResponse

type TaskInstancesResponse struct {
	Data       []models.Task           `json:"data"`
	Stats      *models.TaskDetailStats `json:"stats"`
	Pagination Pagination              `json:"pagination"`
}

type TaskMessageInfo

type TaskMessageInfo struct {
	Id            uuid.UUID         `json:"id"`
	ExceptionHash string            `json:"exceptionHash"`
	StackTrace    string            `json:"stackTrace"`
	RecordedAt    string            `json:"recordedAt"`
	Attributes    map[string]string `json:"attributes,omitempty"`
}

type TaskSearchRequest

type TaskSearchRequest struct {
	FromDate      time.Time        `json:"fromDate"`
	ToDate        time.Time        `json:"toDate"`
	OrderBy       string           `json:"orderBy"`
	SortDirection string           `json:"sortDirection"`
	Pagination    PaginationParams `json:"pagination"`
}

type UpdateProjectRequest added in v1.7.22

type UpdateProjectRequest struct {
	Name      string `json:"name" binding:"required"`
	Framework string `json:"framework" binding:"required"`
}

type UpdateSettingsRequest

type UpdateSettingsRequest struct {
	Timezone string `json:"timezone" binding:"required"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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