Documentation ¶
Index ¶
- Constants
- Variables
- func FromVerboseID(verboseId string) (int, error)
- func GetEmailsToNotify(emails *string) ([]*string, error)
- func IsDevEnv() bool
- func IsDevOrTestEnv() bool
- func IsTestEnv() bool
- func MarshalStringArray(sa pq.StringArray) graphql.Marshaler
- func MarshalTimestamp(t time.Time) graphql.Marshaler
- func MigrateDB(ctx context.Context, DB *gorm.DB) (bool, error)
- func SendBillingNotifications(ctx context.Context, db *gorm.DB, mailClient *sendgrid.Client, ...) error
- func SendWelcomeSlackMessage(ctx context.Context, obj IAlert, input *SendWelcomeSlackMessageInput) error
- func SetupDB(ctx context.Context, dbName string) (*gorm.DB, error)
- func UnmarshalStringArray(i interface{}) (pq.StringArray, error)
- func UnmarshalTimestamp(v interface{}) (time.Time, error)
- type AWSMarketplaceCustomer
- type Admin
- type Alert
- func (obj *Alert) GetChannelsToNotify() ([]*modelInputs.SanitizedSlackChannel, error)
- func (obj *Alert) GetDailyErrorEventFrequency(db *gorm.DB, id int) ([]*int64, error)
- func (obj *Alert) GetDailyLogEventFrequency(db *gorm.DB, id int) ([]*int64, error)
- func (obj *Alert) GetDailySessionEventFrequency(db *gorm.DB, id int) ([]*int64, error)
- func (obj *Alert) GetEmailsToNotify() ([]*string, error)
- func (obj *Alert) GetExcludedEnvironments() ([]*string, error)
- func (obj *Alert) GetName() string
- type AlertIntegrations
- type AllWorkspaceSettings
- type BillingEmailHistory
- type CommentFollower
- type CommentReply
- type CommentSlackThread
- type DailyErrorCount
- type DailySessionCount
- type Dashboard
- type DashboardMetric
- type DashboardMetricFilter
- type DateRange
- type DeleteSessionsTask
- type DiscordChannel
- type DiscordChannels
- type EmailOptOut
- type EmailSignup
- type EnhancedUserDetails
- type ErrorAlert
- type ErrorAlertEvent
- type ErrorComment
- type ErrorField
- type ErrorFingerprint
- type ErrorGroup
- type ErrorGroupActivityLog
- type ErrorGroupAdminsView
- type ErrorGroupEmbeddings
- type ErrorGroupEventType
- type ErrorGroupingMethod
- type ErrorInstance
- type ErrorObject
- type ErrorObjectEmbeddings
- type ErrorResults
- type ErrorSearchParams
- type ErrorSegment
- type ErrorTag
- type ErrorsHistogram
- type EventChunk
- type EventsCursor
- type EventsObject
- type ExternalAttachment
- type Field
- type FingerprintType
- type Graph
- type HasSecret
- type IAlert
- type Int64Model
- type IntegrationProjectMapping
- type IntegrationWorkspaceMapping
- type JSONB
- type LengthRange
- type LogAdminsView
- type LogAlert
- type LogAlertEvent
- type MarkBackendSetupType
- type MatchedErrorObject
- type MessagesObject
- type Metric
- type MetricGroup
- type MetricMonitor
- type MicrosoftTeamsChannel
- type MicrosoftTeamsChannels
- type MicrosoftTeamsTeam
- type Model
- type OAuthClientStore
- type OAuthOperation
- type Object
- type Organization
- type Param
- type PricingProductType
- type PricingSubscriptionInterval
- type Project
- type ProjectFilterSettings
- type RageClickEvent
- type RawPayloadType
- type RegistrationData
- type ResourcesObject
- type ResthookSubscription
- type Retryable
- type RetryableType
- type SavedAsset
- type SavedSegment
- type SearchParams
- type Segment
- type SendWelcomeSlackMessageInput
- type Service
- type Session
- type SessionAdminsView
- type SessionAlert
- type SessionAlertEvent
- type SessionComment
- type SessionCommentTag
- type SessionData
- type SessionExport
- type SessionExportFormat
- type SessionInsight
- type SessionInterval
- type SessionPayload
- type SessionResults
- type SessionsHistogram
- type SetupEvent
- type SlackChannel
- type SystemConfiguration
- type TableConfig
- type TimelineIndicatorEvent
- type TrackProperty
- type UserJourneyStep
- type UserProperty
- type Vector
- type VercelIntegrationConfig
- type Visualization
- type VisualizationsResponse
- type WebhookDestination
- type WebhookDestinations
- type Workspace
- func (w *Workspace) AdminEmailAddresses(db *gorm.DB) ([]struct{ ... }, error)
- func (u *Workspace) BeforeCreate(tx *gorm.DB) (err error)
- func (w *Workspace) GetRetentionPeriod() modelInputs.RetentionPeriod
- func (workspace *Workspace) GetSecret() *string
- func (u *Workspace) IntegratedSlackChannels() ([]SlackChannel, error)
- type WorkspaceAccessRequest
- type WorkspaceAdmin
- type WorkspaceAdminRole
- type WorkspaceInviteLink
Constants ¶
View Source
const ( SUGGESTION_LIMIT_CONSTANT = 8 EVENTS_OBJECTS_ADVISORY_LOCK_ID = 1337 InternalMetricCategory = "__internal" AWS_REGION_US_EAST_2 = "us-east-2" )
View Source
const ( SESSIONS_TBL = "sessions" METRIC_GROUPS_NAME_SESSION_UNIQ = "metric_groups_name_session_uniq" DASHBOARD_METRIC_FILTERS_UNIQ = "dashboard_metric_filters_uniq" )
View Source
const PARTITION_SESSION_ID = 30000000
Variables ¶
View Source
var ( DevEnv = "dev" TestEnv = "test" )
View Source
var ( DB *gorm.DB HashID *hashids.HashID F = false T = true )
View Source
var AdminRole = struct { ADMIN string MEMBER string }{ ADMIN: "ADMIN", MEMBER: "MEMBER", }
View Source
var AlertType = struct { ERROR string NEW_USER string TRACK_PROPERTIES string USER_PROPERTIES string ERROR_FEEDBACK string RAGE_CLICK string NEW_SESSION string LOG string }{ ERROR: "ERROR_ALERT", NEW_USER: "NEW_USER_ALERT", TRACK_PROPERTIES: "TRACK_PROPERTIES_ALERT", USER_PROPERTIES: "USER_PROPERTIES_ALERT", ERROR_FEEDBACK: "ERROR_FEEDBACK_ALERT", RAGE_CLICK: "RAGE_CLICK_ALERT", NEW_SESSION: "NEW_SESSION_ALERT", LOG: "LOG", }
TODO(et) - replace this with generated SessionAlertType
View Source
var ContextKeys = struct { IP contextString UserAgent contextString AcceptLanguage contextString UID contextString OAuthClientID contextString // The email for the current user. If the email is a @highlight.run, the email will need to be verified, otherwise `Email` will be an empty string. Email contextString AcceptEncoding contextString ZapierToken contextString ZapierProject contextString SessionId contextString }{ IP: "ip", UserAgent: "userAgent", AcceptLanguage: "acceptLanguage", UID: "uid", Email: "email", AcceptEncoding: "acceptEncoding", ZapierToken: "parsedToken", ZapierProject: "project", SessionId: "sessionId", }
View Source
var ErrorType = struct { FRONTEND string BACKEND string }{ FRONTEND: "Frontend", BACKEND: "Backend", }
View Source
var Fingerprint = struct { StackFrameCode FingerprintType StackFrameMetadata FingerprintType JsonResult FingerprintType }{ StackFrameCode: "CODE", StackFrameMetadata: "META", JsonResult: "JSON", }
View Source
var Models = []interface{}{ &AWSMarketplaceCustomer{}, &ErrorObject{}, &ErrorGroup{}, &ErrorGroupEmbeddings{}, &ErrorField{}, &ErrorSegment{}, &SavedSegment{}, &Organization{}, &Segment{}, &Admin{}, &Session{}, &SessionInterval{}, &SessionExport{}, &DailySessionCount{}, &DailyErrorCount{}, &Field{}, &EmailSignup{}, &ExternalAttachment{}, &SessionComment{}, &SessionCommentTag{}, &ErrorComment{}, &CommentReply{}, &CommentFollower{}, &CommentSlackThread{}, &ErrorAlert{}, &ErrorAlertEvent{}, &SessionAlert{}, &SessionAlertEvent{}, &LogAlert{}, &LogAlertEvent{}, &Project{}, &RageClickEvent{}, &Workspace{}, &WorkspaceAdmin{}, &WorkspaceInviteLink{}, &WorkspaceAccessRequest{}, &EnhancedUserDetails{}, &RegistrationData{}, &MetricGroup{}, &Metric{}, &MetricMonitor{}, &ErrorFingerprint{}, &EventChunk{}, &SavedAsset{}, &Dashboard{}, &DashboardMetric{}, &DashboardMetricFilter{}, &DeleteSessionsTask{}, &VercelIntegrationConfig{}, &OAuthClientStore{}, &OAuthOperation{}, &ResthookSubscription{}, &IntegrationProjectMapping{}, &IntegrationWorkspaceMapping{}, &EmailOptOut{}, &BillingEmailHistory{}, &Service{}, &SetupEvent{}, &SessionAdminsView{}, &ErrorGroupAdminsView{}, &LogAdminsView{}, &ProjectFilterSettings{}, &AllWorkspaceSettings{}, &ErrorGroupActivityLog{}, &UserJourneyStep{}, &SystemConfiguration{}, &SessionInsight{}, &ErrorTag{}, &Graph{}, &Visualization{}, }
View Source
var SessionCommentTypes = struct { // Comments created by a Highlight user on the Highlight app. ADMIN string // Comments created by a Highlight customer, comes from feedback from their app. FEEDBACK string }{ ADMIN: "ADMIN", FEEDBACK: "FEEDBACK", }
Functions ¶
func FromVerboseID ¶
func GetEmailsToNotify ¶
func IsDevOrTestEnv ¶
func IsDevOrTestEnv() bool
func MarshalStringArray ¶
func MarshalStringArray(sa pq.StringArray) graphql.Marshaler
func SendWelcomeSlackMessage ¶
func SendWelcomeSlackMessage(ctx context.Context, obj IAlert, input *SendWelcomeSlackMessageInput) error
func UnmarshalStringArray ¶
func UnmarshalStringArray(i interface{}) (pq.StringArray, error)
func UnmarshalTimestamp ¶
Types ¶
type AWSMarketplaceCustomer ¶
type Admin ¶
type Admin struct { Model Name *string FirstName *string LastName *string HubspotContactID *int Email *string AboutYouDetailsFilled *bool Phone *string NumberOfSessionsViewed *int NumberOfErrorGroupsViewed *int NumberOfLogsViewed *int EmailVerified *bool `gorm:"default:false"` PhotoURL *string `json:"photo_url"` UID *string `gorm:"uniqueIndex"` Organizations []Organization `gorm:"many2many:organization_admins;"` Projects []Project `gorm:"many2many:project_admins;"` SessionComments []SessionComment `gorm:"many2many:session_comment_admins;"` ErrorComments []ErrorComment `gorm:"many2many:error_comment_admins;"` Workspaces []Workspace `gorm:"many2many:workspace_admins;"` SlackIMChannelID *string // How/where this user was referred from to sign up to Highlight. Referral *string `json:"referral"` // This is the role the Admin has specified. This is their role in their organization, not within Highlight. This should not be used for authorization checks. UserDefinedRole *string `json:"user_defined_role"` UserDefinedTeamSize *string `json:"user_defined_team_size"` UserDefinedPersona *string `json:"user_defined_persona"` HeardAbout *string `json:"heard_about"` PhoneHomeContactAllowed *bool `json:"phone_home_contact_allowed"` }
type Alert ¶
type Alert struct { ProjectID int ExcludedEnvironments *string CountThreshold int ThresholdWindow *int // TODO(geooot): [HIG-2351] make this not a pointer or change graphql struct field to be nullable ChannelsToNotify *string EmailsToNotify *string Name string Type *string `gorm:"index"` LastAdminToEditID int `gorm:"last_admin_to_edit_id"` Frequency int `gorm:"default:15"` // time in seconds Disabled *bool `gorm:"default:false"` Default bool `gorm:"default:false"` // alert created during setup flow }
func (*Alert) GetChannelsToNotify ¶
func (obj *Alert) GetChannelsToNotify() ([]*modelInputs.SanitizedSlackChannel, error)
func (*Alert) GetDailyErrorEventFrequency ¶
func (*Alert) GetDailyLogEventFrequency ¶
func (*Alert) GetDailySessionEventFrequency ¶
func (*Alert) GetEmailsToNotify ¶
func (*Alert) GetExcludedEnvironments ¶
type AlertIntegrations ¶
type AlertIntegrations struct { DiscordChannelsToNotify DiscordChannels `gorm:"type:jsonb;default:'[]'" json:"discord_channels_to_notify"` MicrosoftTeamsChannelsToNotify MicrosoftTeamsChannels `gorm:"type:jsonb;default:'[]'" json:"microsoft_teams_channels_to_notify"` WebhookDestinations WebhookDestinations `gorm:"type:jsonb;default:'[]'" json:"webhook_destinations"` }
type AllWorkspaceSettings ¶
type AllWorkspaceSettings struct { Model WorkspaceID int `gorm:"uniqueIndex"` AIApplication bool `gorm:"default:true"` AIInsights bool `gorm:"default:false"` // use embeddings to group errors in this workspace ErrorEmbeddingsGroup bool `gorm:"default:true"` // use embeddings to tag error groups in this workspace ErrorEmbeddingsTagGroup bool `gorm:"default:true"` ErrorEmbeddingsThreshold float64 `gorm:"default:0.2"` ReplaceAssets bool `gorm:"default:false"` StoreIP bool `gorm:"default:false"` EnableSessionExport bool `gorm:"default:false"` EnableIngestSampling bool `gorm:"default:false"` EnableUnlistedSharing bool `gorm:"default:true"` EnableNetworkTraces bool `gorm:"default:true"` EnableBillingLimits bool `gorm:"default:false"` // old plans grandfathered in to true EnableDataDeletion bool `gorm:"default:true"` CanShowBillingIssueBanner bool `gorm:"default:true"` EnableGrafanaDashboard bool `gorm:"default:false"` }
type BillingEmailHistory ¶
type CommentFollower ¶
type CommentReply ¶
type CommentSlackThread ¶
type DailyErrorCount ¶
type DailySessionCount ¶
type DashboardMetric ¶
type DashboardMetric struct { Model DashboardID int `gorm:"index;not null;"` Name string Description string ComponentType *modelInputs.MetricViewComponentType ChartType *modelInputs.DashboardChartType Aggregator *modelInputs.MetricAggregator `gorm:"default:P50"` MaxGoodValue *float64 MaxNeedsImprovementValue *float64 PoorValue *float64 Units *string HelpArticle *string MinValue *float64 MinPercentile *float64 MaxValue *float64 MaxPercentile *float64 Filters []*DashboardMetricFilter `gorm:"foreignKey:MetricID"` Groups pq.StringArray `gorm:"type:text[]"` }
type DashboardMetricFilter ¶
type DashboardMetricFilter struct { Model MetricID int MetricMonitorID int Tag string Op modelInputs.MetricTagFilterOp `gorm:"default:equals"` Value string }
type DeleteSessionsTask ¶
type DiscordChannel ¶
type DiscordChannels ¶
type DiscordChannels []*DiscordChannel
func (*DiscordChannels) Scan ¶
func (dc *DiscordChannels) Scan(value interface{}) error
Scan scan value into Jsonb, implements sql.Scanner interface
type EmailOptOut ¶
type EmailOptOut struct { Model AdminID int `gorm:"uniqueIndex:email_opt_out_admin_category_idx"` Category modelInputs.EmailOptOutCategory `gorm:"uniqueIndex:email_opt_out_admin_category_idx"` ProjectID *int `gorm:"uniqueIndex:email_opt_out_admin_category_project_idx"` }
type EmailSignup ¶
type EnhancedUserDetails ¶
type ErrorAlert ¶
type ErrorAlert struct { Model Alert RegexGroups *string Query string AlertIntegrations }
func (*ErrorAlert) GetRegexGroups ¶
func (obj *ErrorAlert) GetRegexGroups() ([]*string, error)
type ErrorAlertEvent ¶
type ErrorComment ¶
type ErrorComment struct { Model Admins []Admin `gorm:"many2many:error_comment_admins;"` ProjectID int `json:"project_id"` AdminId int ErrorId int ErrorSecureId string `gorm:"index;not null;default:''"` Text string Attachments []*ExternalAttachment `gorm:"foreignKey:ErrorCommentID"` Replies []*CommentReply `gorm:"foreignKey:ErrorCommentID"` Followers []*CommentFollower `gorm:"foreignKey:ErrorCommentID"` Threads []*CommentSlackThread `gorm:"foreignKey:ErrorCommentID"` }
type ErrorField ¶
type ErrorField struct { Model ProjectID int `json:"project_id"` Name string Value string ErrorGroups []ErrorGroup `gorm:"many2many:error_group_fields;"` }
type ErrorFingerprint ¶
type ErrorGroup ¶
type ErrorGroup struct { Model // The ID used publicly for the URL on the client; used for sharing SecureID string `json:"secure_id" gorm:"uniqueIndex;not null;default:secure_id_generator()"` ProjectID int `json:"project_id"` Event string Type string Trace string //DEPRECATED, USE STACKTRACE INSTEAD StackTrace string MappedStackTrace *string State modelInputs.ErrorState `json:"state" gorm:"default:OPEN"` SnoozedUntil *time.Time `json:"snoozed_until"` Fields []*ErrorField `gorm:"many2many:error_group_fields;" json:"fields"` Fingerprints []*ErrorFingerprint FieldGroup *string Environments string IsPublic bool `gorm:"default:false"` ErrorFrequency []int64 `gorm:"-"` ErrorMetrics []*modelInputs.ErrorDistributionItem `gorm:"-"` FirstOccurrence *time.Time `gorm:"-"` LastOccurrence *time.Time `gorm:"-"` ErrorObjects []ErrorObject ServiceName string // manually migrate as gorm wants to make this have a default value otherwise ErrorTagID *int `gorm:"-:migration"` ErrorTag *ErrorTag `gorm:"-:migration"` // Represents the admins that have viewed this session. ViewedByAdmins []Admin `json:"viewed_by_admins" gorm:"many2many:error_group_admins_views;"` Viewed *bool `json:"viewed"` }
func (*ErrorGroup) GetSlackAttachment ¶
func (e *ErrorGroup) GetSlackAttachment(attachment *slack.Attachment) error
type ErrorGroupActivityLog ¶
type ErrorGroupAdminsView ¶
type ErrorGroupEmbeddings ¶
type ErrorGroupEventType ¶
type ErrorGroupEventType string
const ( ErrorGroupResolvedEvent ErrorGroupEventType = "ErrorGroupResolved" ErrorGroupIgnoredEvent ErrorGroupEventType = "ErrorGroupIgnored" ErrorGroupOpenedEvent ErrorGroupEventType = "ErrorGroupOpened" )
type ErrorGroupingMethod ¶
type ErrorGroupingMethod string
const ( ErrorGroupingMethodClassic ErrorGroupingMethod = "Classic" ErrorGroupingMethodAdaEmbeddingV2 ErrorGroupingMethod = "AdaV2" ErrorGroupingMethodGteLargeEmbeddingV2 ErrorGroupingMethod = "thenlper/gte-large" ErrorGroupingMethodGteLargeEmbeddingV3 ErrorGroupingMethod = "thenlper/gte-large.v3" )
type ErrorInstance ¶
type ErrorInstance struct { ErrorObject ErrorObject `json:"error_object"` NextID *int `json:"next_id"` PreviousID *int `json:"previous_id"` }
type ErrorObject ¶
type ErrorObject struct { Model ID int `gorm:"primary_key;type:integer;autoIncrement;index:idx_error_group_id_id,priority:2,option:CONCURRENTLY" json:"id" deep:"-"` ProjectID int `json:"project_id"` SessionID *int `gorm:"type:integer"` TraceID *string SpanID *string LogCursor *string `gorm:"index:idx_error_object_log_cursor,option:CONCURRENTLY"` ErrorGroupID int `gorm:"index:idx_error_group_id_id,priority:1,option:CONCURRENTLY;type:integer"` ErrorGroupIDAlternative int // the alternative algorithm for grouping the object ErrorGroupingMethod ErrorGroupingMethod ErrorGroup ErrorGroup Event string Type string URL string Source string LineNumber int `gorm:"type:integer"` ColumnNumber int `gorm:"type:integer"` OS string Browser string Trace *string `json:"trace"` //DEPRECATED, USE STACKTRACE INSTEAD StackTrace *string `json:"stack_trace"` MappedStackTrace *string Timestamp time.Time `json:"timestamp"` Payload *string `json:"payload"` Environment string RequestID *string // From X-Highlight-Request header IsBeacon bool `gorm:"default:false"` ServiceName string ServiceVersion string }
type ErrorObjectEmbeddings ¶
type ErrorResults ¶
type ErrorResults struct { ErrorGroups []ErrorGroup TotalCount int64 }
type ErrorSearchParams ¶
type ErrorSearchParams struct { DateRange *DateRange `json:"date_range"` Browser *string `json:"browser"` OS *string `json:"os"` VisitedURL *string `json:"visited_url"` Event *string `json:"event"` State *modelInputs.ErrorState `json:"state"` Query *string `json:"query"` }
type ErrorSegment ¶
type ErrorsHistogram ¶
type EventChunk ¶
type EventsCursor ¶
For a given session, an EventCursor is the address of an event in the list of events, that can be used for incremental fetching. The EventIndex must always be specified, with the EventObjectIndex optionally specified for optimization purposes.
type EventsObject ¶
type EventsObject struct { Model ID int `json:"id"` // Shadow Model.ID to avoid creating a pkey constraint SessionID int Events string IsBeacon bool `gorm:"default:false"` }
func (*EventsObject) Contents ¶
func (m *EventsObject) Contents() string
type ExternalAttachment ¶
type ExternalAttachment struct { Model IntegrationType modelInputs.IntegrationType ExternalID string Title string SessionCommentID int `gorm:"index"` ErrorCommentID int `gorm:"index"` Removed bool `gorm:"default:false"` }
type Field ¶
type Field struct { Int64Model // 'user_property', 'session_property'. Type string `gorm:"uniqueIndex:idx_fields_type_name_value_project_id"` // 'email', 'identifier', etc. Name string `gorm:"uniqueIndex:idx_fields_type_name_value_project_id"` // 'email@email.com' Value string `gorm:"uniqueIndex:idx_fields_type_name_value_project_id"` ProjectID int `json:"project_id" gorm:"uniqueIndex:idx_fields_type_name_value_project_id"` Sessions []Session `gorm:"many2many:session_fields;"` }
type FingerprintType ¶
type FingerprintType string
type Graph ¶
type Graph struct { Model VisualizationID int `gorm:"index"` Type string Title string ProductType modelInputs.ProductType Query string Metric string FunctionType modelInputs.MetricAggregator GroupByKey *string BucketByKey *string BucketCount *int Limit *int LimitFunctionType *modelInputs.MetricAggregator LimitMetric *string Display *string NullHandling *string }
type IAlert ¶
type IAlert interface { GetChannelsToNotify() ([]*modelInputs.SanitizedSlackChannel, error) GetName() string }
type Int64Model ¶
type IntegrationProjectMapping ¶
type IntegrationProjectMapping struct { IntegrationType modelInputs.IntegrationType `gorm:"uniqueIndex:idx_integration_project_mapping_project_id_integration_type"` ProjectID int `gorm:"uniqueIndex:idx_integration_project_mapping_project_id_integration_type"` ExternalID string }
type IntegrationWorkspaceMapping ¶
type IntegrationWorkspaceMapping struct { IntegrationType modelInputs.IntegrationType `gorm:"primary_key;not null"` WorkspaceID int `gorm:"primary_key;not null"` AccessToken string `gorm:"not null"` RefreshToken string Expiry time.Time }
type LengthRange ¶
type LogAdminsView ¶
type LogAlert ¶
type LogAlert struct { Model Alert Query string BelowThreshold bool AlertIntegrations }
type LogAlertEvent ¶
type LogAlertEvent struct { ID int64 `gorm:"primary_key;type:bigint;autoIncrement" json:"id" deep:"-"` LogAlertID int `gorm:"index:idx_log_alert_event"` Query string `gorm:"index:idx_log_alert_event"` StartDate time.Time `gorm:"index:idx_log_alert_event"` EndDate time.Time `gorm:"index:idx_log_alert_event"` SentAt time.Time }
type MarkBackendSetupType ¶
type MarkBackendSetupType = string
const ( // Generic is temporary and can be removed once all messages are processed. MarkBackendSetupTypeGeneric MarkBackendSetupType = "generic" MarkBackendSetupTypeSession MarkBackendSetupType = "session" MarkBackendSetupTypeError MarkBackendSetupType = "error" MarkBackendSetupTypeLogs MarkBackendSetupType = "logs" MarkBackendSetupTypeTraces MarkBackendSetupType = "traces" )
type MatchedErrorObject ¶
type MatchedErrorObject struct { ErrorObject Score float64 `json:"score"` }
type MessagesObject ¶
type MessagesObject struct { Model ID int `json:"id"` // Shadow Model.ID to avoid creating a pkey constraint SessionID int Messages string IsBeacon bool `gorm:"default:false"` }
func (*MessagesObject) Contents ¶
func (m *MessagesObject) Contents() string
type MetricGroup ¶
type MetricMonitor ¶
type MetricMonitor struct { Model ProjectID int `gorm:"index;not null;"` Name string Aggregator modelInputs.MetricAggregator `gorm:"default:P50"` PeriodMinutes *int // apply aggregator function on PeriodMinutes lookback Threshold float64 Units *string // Threshold value is in these Units. MetricToMonitor string ChannelsToNotify *string `gorm:"channels_to_notify"` EmailsToNotify *string `gorm:"emails_to_notify"` LastAdminToEditID int `gorm:"last_admin_to_edit_id"` Disabled *bool `gorm:"default:false"` Filters []*DashboardMetricFilter `gorm:"foreignKey:MetricMonitorID"` AlertIntegrations }
func (*MetricMonitor) GetChannelsToNotify ¶
func (obj *MetricMonitor) GetChannelsToNotify() ([]*modelInputs.SanitizedSlackChannel, error)
func (*MetricMonitor) GetId ¶
func (obj *MetricMonitor) GetId() int
func (*MetricMonitor) GetName ¶
func (obj *MetricMonitor) GetName() string
type MicrosoftTeamsChannel ¶
type MicrosoftTeamsChannels ¶
type MicrosoftTeamsChannels []*MicrosoftTeamsChannel
func (*MicrosoftTeamsChannels) Scan ¶
func (dc *MicrosoftTeamsChannels) Scan(value interface{}) error
Scan scan value into Jsonb, implements sql.Scanner interface
type MicrosoftTeamsTeam ¶
type MicrosoftTeamsTeam struct {
ID string `json:"id"`
}
type OAuthClientStore ¶
type OAuthClientStore struct { ID string `gorm:"primary_key;default:uuid_generate_v4()"` CreatedAt time.Time `json:"created_at" deep:"-"` Secret string `gorm:"uniqueIndex;not null"` Domains pq.StringArray `gorm:"not null;type:text[]"` AppName string AdminID int Admin *Admin Operations []*OAuthOperation `gorm:"foreignKey:ClientID"` }
type OAuthOperation ¶
type Organization ¶
type Organization struct { Model Name *string BillingEmail *string Secret *string `json:"-"` Admins []Admin `gorm:"many2many:organization_admins;"` TrialEndDate *time.Time `json:"trial_end_date"` // Slack API Interaction. SlackAccessToken *string SlackWebhookURL *string SlackWebhookChannel *string SlackWebhookChannelID *string SlackChannels *string // Manual monthly session limit override MonthlySessionLimit *int }
type Param ¶
type Param struct { Action string `json:"action"` Type string `json:"type"` Value struct { Text string `json:"text"` Value string `json:"value"` } `json:"value"` }
Params used for reading from search requests.
func DecodeAndValidateParams ¶
type PricingProductType ¶
type PricingProductType string
const ( PricingProductTypeBase PricingProductType = "BASE" PricingProductTypeMembers PricingProductType = "MEMBERS" PricingProductTypeSessions PricingProductType = "SESSIONS" PricingProductTypeErrors PricingProductType = "ERRORS" PricingProductTypeLogs PricingProductType = "LOGS" PricingProductTypeTraces PricingProductType = "TRACES" )
type PricingSubscriptionInterval ¶
type PricingSubscriptionInterval string
const ( PricingSubscriptionIntervalMonthly PricingSubscriptionInterval = "MONTHLY" PricingSubscriptionIntervalAnnual PricingSubscriptionInterval = "ANNUAL" )
type Project ¶
type Project struct { Model Name *string ZapierAccessToken *string FrontAccessToken *string FrontRefreshToken *string FrontTokenExpiresAt *time.Time BillingEmail *string Secret *string `json:"-"` Admins []Admin `gorm:"many2many:project_admins;"` TrialEndDate *time.Time `json:"trial_end_date"` // Manual monthly session limit override MonthlySessionLimit *int WorkspaceID int FreeTier bool `gorm:"default:false"` ExcludedUsers pq.StringArray `json:"excluded_users" gorm:"type:text[]"` ErrorFilters pq.StringArray `gorm:"type:text[]"` ErrorJsonPaths pq.StringArray `gorm:"type:text[]"` // BackendSetup will be true if this is the session where HighlightBackend is run for the first time BackendSetup *bool `json:"backend_setup"` SetupEvent []*SetupEvent `gorm:"foreignKey:ProjectID"` // Maximum time window considered for a rage click event RageClickWindowSeconds int `gorm:"default:5"` // Maximum distance between clicks for a rage click event RageClickRadiusPixels int `gorm:"default:8"` // Minimum count of clicks in a rage click event RageClickCount int `gorm:"default:5"` // Applies to all browser extensions // TODO - rename to FilterBrowserExtension #5811 FilterChromeExtension *bool `gorm:"default:false"` }
type ProjectFilterSettings ¶
type ProjectFilterSettings struct { Model Project *Project ProjectID int FilterSessionsWithoutError bool `gorm:"default:false"` AutoResolveStaleErrorsDayInterval int `gorm:"default:0"` SessionSamplingRate float64 `gorm:"default:1"` ErrorSamplingRate float64 `gorm:"default:1"` LogSamplingRate float64 `gorm:"default:1"` TraceSamplingRate float64 `gorm:"default:1"` SessionMinuteRateLimit *int64 ErrorMinuteRateLimit *int64 LogMinuteRateLimit *int64 TraceMinuteRateLimit *int64 SessionExclusionQuery *string ErrorExclusionQuery *string LogExclusionQuery *string TraceExclusionQuery *string }
type RageClickEvent ¶
type RawPayloadType ¶
type RawPayloadType string
const ( PayloadTypeEvents RawPayloadType = "raw-events" PayloadTypeResources RawPayloadType = "raw-resources" PayloadTypeWebSocketEvents RawPayloadType = "raw-web-socket-events" )
type RegistrationData ¶
type ResourcesObject ¶
type ResourcesObject struct { Model ID int `json:"id"` // Shadow Model.ID to avoid creating a pkey constraint SessionID int Resources string IsBeacon bool `gorm:"default:false"` }
func (*ResourcesObject) Contents ¶
func (r *ResourcesObject) Contents() string
type ResthookSubscription ¶
type RetryableType ¶
type RetryableType string
const (
RetryableOpensearchError RetryableType = "OPENSEARCH_ERROR"
)
type SavedAsset ¶
type SavedAsset struct { ProjectID int `gorm:"uniqueIndex:idx_saved_assets_project_id_original_url_date;index:idx_project_id_hash_val"` OriginalUrl string `gorm:"uniqueIndex:idx_saved_assets_project_id_original_url_date"` Date string `gorm:"uniqueIndex:idx_saved_assets_project_id_original_url_date"` HashVal string `gorm:"index:idx_project_id_hash_val"` }
type SavedSegment ¶
type SavedSegment struct { Model Name string EntityType modelInputs.SavedSegmentEntityType `gorm:"index:idx_saved_segment,priority:2"` Params string `json:"params"` ProjectID int `gorm:"index:idx_saved_segment,priority:1" json:"project_id"` }
type SearchParams ¶
type SearchParams struct { UserProperties []*UserProperty `json:"user_properties"` ExcludedProperties []*UserProperty `json:"excluded_properties"` TrackProperties []*UserProperty `json:"track_properties"` ExcludedTrackProperties []*UserProperty `json:"excluded_track_properties"` DateRange *DateRange `json:"date_range"` LengthRange *LengthRange `json:"length_range"` Browser *string `json:"browser"` OS *string `json:"os"` Environments []*string `json:"environments"` AppVersions []*string `json:"app_versions"` DeviceID *string `json:"device_id"` VisitedURL *string `json:"visited_url"` Referrer *string `json:"referrer"` Identified bool `json:"identified"` HideViewed bool `json:"hide_viewed"` FirstTime bool `json:"first_time"` ShowLiveSessions bool `json:"show_live_sessions"` Query *string `json:"query"` }
func (*SearchParams) GormDataType ¶
func (s *SearchParams) GormDataType() string
type Service ¶
type Service struct { Model ProjectID int `gorm:"not null;uniqueIndex:idx_project_id_name"` Name string `gorm:"not null;uniqueIndex:idx_project_id_name"` Status modelInputs.ServiceStatus `gorm:"not null;default:created"` GithubRepoPath *string BuildPrefix *string GithubPrefix *string ErrorDetails pq.StringArray `gorm:"type:text[]"` ProcessName *string ProcessVersion *string ProcessDescription *string }
type Session ¶
type Session struct { Model // The ID used publicly for the URL on the client; used for sharing SecureID string `json:"secure_id" gorm:"uniqueIndex;not null;default:secure_id_generator()"` // For associating unidentified sessions with a user after identification ClientID string `json:"client_id" gorm:"not null;default:''"` // Whether a session has been identified. Identified bool `json:"identified" gorm:"default:false;not null"` Fingerprint int `json:"fingerprint"` // User provided identifier (see IdentifySession) Identifier string `json:"identifier"` ProjectID int `json:"project_id"` Email *string `json:"email"` // Location data based off user ip (see InitializeSession) IP string `json:"ip"` City string `json:"city"` State string `json:"state"` Postal string `json:"postal"` Country string `json:"country"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` // Details based off useragent (see Initialize Session) OSName string `json:"os_name"` OSVersion string `json:"os_version"` BrowserName string `json:"browser_name"` BrowserVersion string `json:"browser_version"` Language string `json:"language"` // Tells us if 'beforeunload' was fired on the client - note this is not necessarily fired on every session end HasUnloaded bool `gorm:"default:false"` // Tells us if the session has been parsed by a worker. Processed *bool `json:"processed"` HasComments bool `json:"has_comments" gorm:"default:false"` HasRageClicks *bool `json:"has_rage_clicks"` HasErrors *bool `json:"has_errors"` HasOutOfOrderEvents bool `gorm:"default:false"` // The timestamp of the first payload received after the session got processed (if applicable) ResumedAfterProcessedTime *time.Time `json:"resumed_after_processed_time"` // The length of a session. Length int64 `json:"length"` ActiveLength int64 `json:"active_length"` Fields []*Field `json:"fields" gorm:"many2many:session_fields;"` Environment string `json:"environment"` AppVersion *string `json:"app_version"` ServiceName string UserObject JSONB `json:"user_object" gorm:"type:jsonb"` UserProperties string `json:"user_properties"` // Whether this is the first session created by this user. FirstTime *bool `json:"first_time" gorm:"default:false"` PayloadUpdatedAt *time.Time `json:"payload_updated_at"` LastUserInteractionTime time.Time `json:"last_user_interaction_time"` // Set if the last payload was a beacon; cleared on the next non-beacon payload BeaconTime *time.Time `json:"beacon_time"` // Custom properties Viewed *bool `json:"viewed"` Starred *bool `json:"starred"` FieldGroup *string `json:"field_group"` EnableStrictPrivacy *bool `json:"enable_strict_privacy"` PrivacySetting *string `json:"privacy_setting"` EnableRecordingNetworkContents *bool `json:"enable_recording_network_contents"` // The version of Highlight's Client. ClientVersion string `json:"client_version"` // The version of Highlight's Firstload. FirstloadVersion string `json:"firstload_version"` // The client configuration that the end-user sets up. This is used for debugging purposes. ClientConfig *string `json:"client_config" gorm:"type:jsonb"` // Determines whether this session should be viewable. This enforces billing. WithinBillingQuota *bool `json:"within_billing_quota" gorm:"default:true"` // Used for shareable links. No authentication is needed if IsPublic is true IsPublic bool `json:"is_public" gorm:"default:false"` // EventCounts is a len()=100 slice that contains the count of events for the session normalized over 100 points EventCounts *string // Number of pages visited during a session PagesVisited int ObjectStorageEnabled *bool `json:"object_storage_enabled"` DirectDownloadEnabled bool `json:"direct_download_enabled" gorm:"default:false"` AllObjectsCompressed bool `json:"all_resources_compressed" gorm:"default:false"` PayloadSize *int64 `json:"payload_size"` VerboseID string `json:"verbose_id"` // Excluded will be true when we would typically have deleted the session Excluded bool `gorm:"default:false"` ExcludedReason *modelInputs.SessionExcludedReason // Lock is the timestamp at which a session was locked // - when selecting sessions, ignore Locks that are > 10 minutes old // ex. SELECT * FROM sessions WHERE (lock IS NULL OR lock < NOW() - 10 * (INTERVAL '1 MINUTE')) Lock sql.NullTime RetryCount int // Represents the admins that have viewed this session. ViewedByAdmins []Admin `json:"viewed_by_admins" gorm:"many2many:session_admins_views;"` Chunked *bool ProcessWithRedis bool Normalness *float64 }
func (*Session) GetSlackAttachment ¶
func (s *Session) GetSlackAttachment(attachment *slack.Attachment) error
func (*Session) GetUserProperties ¶
type SessionAdminsView ¶
type SessionAlert ¶
type SessionAlert struct { Model Alert TrackProperties *string UserProperties *string ExcludeRules *string AlertIntegrations }
func (*SessionAlert) GetExcludeRules ¶
func (obj *SessionAlert) GetExcludeRules() ([]*string, error)
func (*SessionAlert) GetTrackProperties ¶
func (obj *SessionAlert) GetTrackProperties() ([]*TrackProperty, error)
func (*SessionAlert) GetUserProperties ¶
func (obj *SessionAlert) GetUserProperties() ([]*UserProperty, error)
type SessionAlertEvent ¶
type SessionComment ¶
type SessionComment struct { Model Admins []Admin `gorm:"many2many:session_comment_admins;"` ProjectID int `json:"project_id"` AdminId int `gorm:"type:integer"` SessionId int `gorm:"type:integer"` SessionSecureId string `gorm:"index;not null;default:''"` SessionImage string Timestamp int `gorm:"type:integer"` Text string XCoordinate float64 YCoordinate float64 Type string `json:"type" gorm:"default:ADMIN"` Metadata JSONB `json:"metadata" gorm:"type:jsonb"` Tags []*SessionCommentTag `json:"tags" gorm:"many2many:session_tags;"` Attachments []*ExternalAttachment `gorm:"foreignKey:SessionCommentID"` Replies []*CommentReply `gorm:"foreignKey:SessionCommentID"` Followers []*CommentFollower `gorm:"foreignKey:SessionCommentID"` Threads []*CommentSlackThread `gorm:"foreignKey:SessionCommentID"` }
type SessionCommentTag ¶
type SessionCommentTag struct { Model SessionComments []SessionComment `json:"session_comments" gorm:"many2many:session_tags;"` ProjectID int `json:"project_id"` Name string }
type SessionData ¶
type SessionData struct {
Data string
}
func (*SessionData) Contents ¶
func (sd *SessionData) Contents() string
type SessionExport ¶
type SessionExport struct { Model SessionID int `gorm:"uniqueIndex:idx_session_exports"` Type SessionExportFormat `gorm:"uniqueIndex:idx_session_exports"` URL string Error string TargetEmails pq.StringArray `gorm:"type:text[];"` }
type SessionExportFormat ¶
type SessionExportFormat = string
const ( SessionExportFormatMP4 SessionExportFormat = "video/mp4" SessionExportFormatGif SessionExportFormat = "image/gif" SessionExportFormatPng SessionExportFormat = "image/png" )
type SessionInsight ¶
type SessionInterval ¶
type SessionPayload ¶
type SessionPayload struct { Events []interface{} `json:"events"` Errors []ErrorObject `json:"errors"` RageClicks []RageClickEvent `json:"rage_clicks"` SessionComments []SessionComment `json:"session_comments"` LastUserInteractionTime time.Time `json:"last_user_interaction_time"` }
type SessionResults ¶
type SessionsHistogram ¶
type SetupEvent ¶
type SetupEvent struct { ID int `gorm:"primary_key;type:integer;autoIncrement" json:"id" deep:"-"` CreatedAt time.Time `json:"created_at" deep:"-"` ProjectID int `gorm:"uniqueIndex:idx_project_id_type"` Type MarkBackendSetupType `gorm:"uniqueIndex:idx_project_id_type"` }
type SlackChannel ¶
type SystemConfiguration ¶
type SystemConfiguration struct { Active bool `gorm:"primary_key"` MaintenanceStart time.Time MaintenanceEnd time.Time ErrorFilters pq.StringArray `gorm:"type:text[]"` IgnoredFiles pq.StringArray `gorm:"type:text[]"` MainWorkers int `gorm:"default:64"` LogsWorkers int `gorm:"default:1"` LogsFlushSize int `gorm:"type:bigint;default:1000"` LogsQueueSize int `gorm:"type:bigint;default:100"` LogsFlushTimeout time.Duration `gorm:"type:bigint;default:1000000000"` DataSyncWorkers int `gorm:"default:1"` DataSyncFlushSize int `gorm:"type:bigint;default:1000"` DataSyncQueueSize int `gorm:"type:bigint;default:100"` DataSyncTimeout time.Duration `gorm:"type:bigint;default:1000000000"` TraceWorkers int `gorm:"default:1"` TraceFlushSize int `gorm:"type:bigint;default:1000"` TraceQueueSize int `gorm:"type:bigint;default:100"` TraceFlushTimeout time.Duration `gorm:"type:bigint;default:1000000000"` }
func (*SystemConfiguration) BeforeCreate ¶
func (s *SystemConfiguration) BeforeCreate(tx *gorm.DB) (err error)
type TableConfig ¶
type TimelineIndicatorEvent ¶
type TrackProperty ¶
type UserJourneyStep ¶
type UserProperty ¶
type VercelIntegrationConfig ¶
type Visualization ¶
type VisualizationsResponse ¶
type VisualizationsResponse struct { Count int Results []Visualization }
type WebhookDestination ¶
type WebhookDestinations ¶
type WebhookDestinations []*WebhookDestination
func (*WebhookDestinations) Scan ¶
func (dc *WebhookDestinations) Scan(value interface{}) error
Scan scan value into Jsonb, implements sql.Scanner interface
type Workspace ¶
type Workspace struct { Model Name *string Secret *string // Needed for workspace-level team Admins []Admin `gorm:"many2many:workspace_admins;"` SlackAccessToken *string SlackWebhookURL *string SlackWebhookChannel *string SlackWebhookChannelID *string JiraDomain *string JiraCloudID *string MicrosoftTeamsTenantId *string SlackChannels *string LinearAccessToken *string VercelAccessToken *string VercelTeamID *string Projects []Project MigratedFromProjectID *int // Column can be removed after migration is done HubspotCompanyID *int StripeCustomerID *string AWSMarketplaceCustomer *AWSMarketplaceCustomer `gorm:"foreignKey:WorkspaceID"` PlanTier string `gorm:"default:Free"` UnlimitedMembers bool `gorm:"default:false"` BillingPeriodStart *time.Time BillingPeriodEnd *time.Time NextInvoiceDate *time.Time MonthlySessionLimit *int MonthlyMembersLimit *int MonthlyErrorsLimit *int MonthlyLogsLimit *int MonthlyTracesLimit *int RetentionPeriod *modelInputs.RetentionPeriod ErrorsRetentionPeriod *modelInputs.RetentionPeriod LogsRetentionPeriod *modelInputs.RetentionPeriod TracesRetentionPeriod *modelInputs.RetentionPeriod SessionsMaxCents *int ErrorsMaxCents *int LogsMaxCents *int TracesMaxCents *int StripeSessionOveragePriceID *string StripeErrorOveragePriceID *string StripeLogOveragePriceID *string StripeTracesOveragePriceID *string TrialEndDate *time.Time `json:"trial_end_date"` AllowMeterOverage bool `gorm:"default:true"` AllowedAutoJoinEmailOrigins *string `json:"allowed_auto_join_email_origins"` EligibleForTrialExtension bool `gorm:"default:false"` TrialExtensionEnabled bool `gorm:"default:false"` ClearbitEnabled bool `gorm:"default:false"` DiscordGuildId *string ClickupAccessToken *string PromoCode *string }
func (*Workspace) AdminEmailAddresses ¶
func (*Workspace) GetRetentionPeriod ¶
func (w *Workspace) GetRetentionPeriod() modelInputs.RetentionPeriod
func (*Workspace) IntegratedSlackChannels ¶
func (u *Workspace) IntegratedSlackChannels() ([]SlackChannel, error)
type WorkspaceAccessRequest ¶
type WorkspaceAdmin ¶
type WorkspaceAdminRole ¶
Click to show internal directories.
Click to hide internal directories.