Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorMatchesQuery(errorObject *model2.BackendErrorObjectInput, filters listener.Filters) bool
- func GetPostgresConnectionString() string
- func GetSessionsQueryImpl(admin *model.Admin, params modelInputs.QueryInput, projectId int, ...) (string, []interface{}, bool, error)
- func GetSessionsQueryImplDeprecated(admin *model.Admin, query modelInputs.ClickhouseQuery, projectId int, ...) (string, []interface{}, bool, error)
- func KeyValuesAggregated(ctx context.Context, client *Client, tableName string, projectID int, ...) ([]string, error)
- func KeysAggregated(ctx context.Context, client *Client, tableName string, projectID int, ...) ([]*modelInputs.QueryKey, error)
- func LogMatchesQuery(logRow *LogRow, filters listener.Filters) bool
- func RunMigrations(ctx context.Context, dbName string)
- func SessionMatchesQuery(session *model.Session, filters listener.Filters) bool
- func TraceMatchesQuery(trace *TraceRow, filters listener.Filters) bool
- type ClickhouseErrorGroup
- type ClickhouseErrorObject
- type ClickhouseField
- type ClickhouseSession
- type ClickhouseTraceRow
- type Client
- func (client *Client) BatchWriteLogRows(ctx context.Context, logRows []*LogRow) error
- func (client *Client) BatchWriteTraceRows(ctx context.Context, traceRows []*TraceRow) error
- func (client *Client) DeleteSessions(ctx context.Context, projectId int, sessionIds []int) error
- func (client *Client) ErrorsKeyValues(ctx context.Context, projectID int, keyName string, startDate time.Time, ...) ([]string, error)
- func (client *Client) ErrorsLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
- func (client *Client) ExistingTraceIds(ctx context.Context, projectID int, traceIDs []string, startDate time.Time, ...) ([]string, error)
- func (client *Client) GetConn() driver.Conn
- func (client *Client) HealthCheck(ctx context.Context) error
- func (client *Client) LogsKeyValues(ctx context.Context, projectID int, keyName string, startDate time.Time, ...) ([]string, error)
- func (client *Client) LogsKeys(ctx context.Context, projectID int, startDate time.Time, endDate time.Time, ...) ([]*modelInputs.QueryKey, error)
- func (client *Client) LogsLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
- func (client *Client) QueryErrorFieldValues(ctx context.Context, projectId int, count int, fieldName string, query string, ...) ([]string, error)
- func (client *Client) QueryErrorGroupAggregateFrequency(ctx context.Context, projectId int, errorGroupIds []int) ([]*modelInputs.ErrorDistributionItem, error)
- func (client *Client) QueryErrorGroupFrequencies(ctx context.Context, projectId int, errorGroupIds []int, ...) ([]*modelInputs.ErrorDistributionItem, error)
- func (client *Client) QueryErrorGroupIdsDeprecated(ctx context.Context, projectId int, count int, ...) ([]int64, int64, error)
- func (client *Client) QueryErrorGroupOccurrences(ctx context.Context, projectId int, errorGroupId int) (*time.Time, *time.Time, error)
- func (client *Client) QueryErrorGroupTags(ctx context.Context, projectId int, errorGroupId int) ([]*modelInputs.ErrorGroupTagAggregation, error)
- func (client *Client) QueryErrorGroups(ctx context.Context, projectId int, count int, params modelInputs.QueryInput, ...) ([]int64, int64, error)
- func (client *Client) QueryErrorHistogramDeprecated(ctx context.Context, projectId int, query modelInputs.ClickhouseQuery, ...) ([]time.Time, []int64, error)
- func (client *Client) QueryErrorObjectsHistogram(ctx context.Context, projectId int, params modelInputs.QueryInput, ...) ([]time.Time, []int64, error)
- func (client *Client) QueryFieldNames(ctx context.Context, projectId int, start time.Time, end time.Time) ([]*model.Field, error)
- func (client *Client) QueryFieldValues(ctx context.Context, projectId int, count int, fieldType string, ...) ([]string, error)
- func (client *Client) QuerySessionCustomMetrics(ctx context.Context, projectId int, sessionSecureId string, ...) ([]*model.Metric, error)
- func (client *Client) QuerySessionHistogram(ctx context.Context, admin *model.Admin, projectId int, ...) ([]time.Time, []int64, []int64, []int64, error)
- func (client *Client) QuerySessionHistogramDeprecated(ctx context.Context, admin *model.Admin, projectId int, ...) ([]time.Time, []int64, []int64, []int64, error)
- func (client *Client) QuerySessionIds(ctx context.Context, admin *model.Admin, projectId int, count int, ...) ([]int64, int64, bool, error)
- func (client *Client) QuerySessionIdsDeprecated(ctx context.Context, admin *model.Admin, projectId int, count int, ...) ([]int64, int64, bool, error)
- func (client *Client) ReadErrorsMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, ...) (*modelInputs.MetricsBuckets, error)
- func (client *Client) ReadLogs(ctx context.Context, projectID int, params modelInputs.QueryInput, ...) (*modelInputs.LogConnection, error)
- func (client *Client) ReadLogsDailyAverage(ctx context.Context, projectIds []int, ...) (float64, error)
- func (client *Client) ReadLogsDailySum(ctx context.Context, projectIds []int, ...) (uint64, error)
- func (client *Client) ReadLogsHistogram(ctx context.Context, projectID int, params modelInputs.QueryInput, ...) (*modelInputs.LogsHistogram, error)
- func (client *Client) ReadLogsMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, ...) (*modelInputs.MetricsBuckets, error)
- func (client *Client) ReadLogsTotalCount(ctx context.Context, projectID int, params modelInputs.QueryInput) (uint64, error)
- func (client *Client) ReadSessionLogs(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogEdge, error)
- func (client *Client) ReadSessionsMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, ...) (*modelInputs.MetricsBuckets, error)
- func (client *Client) ReadTrace(ctx context.Context, projectID int, traceID string) ([]*modelInputs.Trace, error)
- func (client *Client) ReadTraces(ctx context.Context, projectID int, params modelInputs.QueryInput, ...) (*modelInputs.TraceConnection, error)
- func (client *Client) ReadTracesDailyAverage(ctx context.Context, projectIds []int, ...) (float64, error)
- func (client *Client) ReadTracesDailySum(ctx context.Context, projectIds []int, ...) (uint64, error)
- func (client *Client) ReadTracesMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, ...) (*modelInputs.MetricsBuckets, error)
- func (client *Client) ReadWorkspaceErrorCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
- func (client *Client) ReadWorkspaceLogCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
- func (client *Client) ReadWorkspaceSessionCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
- func (client *Client) ReadWorkspaceTraceCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
- func (client *Client) SessionsKeyValues(ctx context.Context, projectID int, keyName string, startDate time.Time, ...) ([]string, error)
- func (client *Client) SessionsKeys(ctx context.Context, projectID int, startDate time.Time, endDate time.Time, ...) ([]*modelInputs.QueryKey, error)
- func (client *Client) SessionsLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
- func (client *Client) TracesKeyValues(ctx context.Context, projectID int, keyName string, startDate time.Time, ...) ([]string, error)
- func (client *Client) TracesKeys(ctx context.Context, projectID int, startDate time.Time, endDate time.Time, ...) ([]*modelInputs.QueryKey, error)
- func (client *Client) TracesLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
- func (client *Client) TracesMetrics(ctx context.Context, projectID int, startDate time.Time, endDate time.Time, ...) ([]*modelInputs.QueryKey, error)
- func (client *Client) WriteErrorGroups(ctx context.Context, groups []*model.ErrorGroup) error
- func (client *Client) WriteErrorObjects(ctx context.Context, objects []*model.ErrorObject, sessions []*model.Session) error
- func (client *Client) WriteSessions(ctx context.Context, sessions []*model.Session) error
- type Connection
- type Edge
- type Event
- type FieldType
- type Link
- type LogRow
- type LogRowOption
- func WithBody(ctx context.Context, body string) LogRowOption
- func WithEnvironment(environment string) LogRowOption
- func WithLogAttributes(attributes map[string]string) LogRowOption
- func WithSecureSessionID(secureSessionID string) LogRowOption
- func WithServiceName(serviceName string) LogRowOption
- func WithServiceVersion(version string) LogRowOption
- func WithSeverityText(severityText string) LogRowOption
- func WithSource(source modelInputs.LogSource) LogRowOption
- func WithSpanID(spanID string) LogRowOption
- func WithTraceID(traceID string) LogRowOption
- type Operator
- type Pagination
- type Rule
- type TimeUnit
- type TraceRow
- func (t *TraceRow) WithDuration(startTime time.Time, endTime time.Time) *TraceRow
- func (t *TraceRow) WithEnvironment(environment string) *TraceRow
- func (t *TraceRow) WithEvents(events []map[string]any) *TraceRow
- func (t *TraceRow) WithHasErrors(hasErrors bool) *TraceRow
- func (t *TraceRow) WithLinks(links []map[string]any) *TraceRow
- func (t *TraceRow) WithParentSpanId(parentSpanId string) *TraceRow
- func (t *TraceRow) WithSecureSessionId(sessionId string) *TraceRow
- func (t *TraceRow) WithServiceName(serviceName string) *TraceRow
- func (t *TraceRow) WithServiceVersion(serviceVersion string) *TraceRow
- func (t *TraceRow) WithSpanId(spanId string) *TraceRow
- func (t *TraceRow) WithSpanKind(spanKind string) *TraceRow
- func (t *TraceRow) WithSpanName(spanName string) *TraceRow
- func (t *TraceRow) WithStatusCode(statusCode string) *TraceRow
- func (t *TraceRow) WithStatusMessage(statusMessage string) *TraceRow
- func (t *TraceRow) WithTraceAttributes(attributes map[string]string) *TraceRow
- func (t *TraceRow) WithTraceId(traceId string) *TraceRow
- func (t *TraceRow) WithTraceState(traceState string) *TraceRow
Constants ¶
View Source
const ErrorGroupsTable = "error_groups"
View Source
const ErrorObjectsTable = "error_objects"
View Source
const FieldsTable = "fields"
View Source
const KeyValuesLimit int = 50
View Source
const KeyValuesMaxRows = 1_000_000
View Source
const KeysMaxRows = 1_000_000
View Source
const LogKeyValuesTable = "log_key_values"
View Source
const LogKeysTable = "log_keys"
View Source
const LogsLimit int = 50
View Source
const LogsSamplingTable = "logs_sampling"
View Source
const LogsTable = "logs"
View Source
const OrderBackwardInverted = "Timestamp DESC, UUID DESC"
View Source
const OrderBackwardNatural = "Timestamp ASC, UUID ASC"
View Source
const OrderForwardInverted = "Timestamp ASC, UUID ASC"
View Source
const OrderForwardNatural = "Timestamp DESC, UUID DESC"
View Source
const SamplingRows = 20_000_000
View Source
const SessionKeysTable = "session_keys"
View Source
const SessionsJoinedTable = "sessions_joined_vw"
View Source
const SessionsTable = "sessions"
View Source
const TraceAttributeValueLengthLimit = 2 << 15
View Source
const TraceKeyValuesTable = "trace_key_values"
View Source
const TraceKeysTable = "trace_keys"
View Source
const TraceMetricsTable = "trace_metrics"
View Source
const TracesByIdTable = "traces_by_id"
View Source
const TracesSamplingTable = "traces_sampling"
View Source
const TracesTable = "traces"
Variables ¶
View Source
var ( ServerAddr = os.Getenv("CLICKHOUSE_ADDRESS") PrimaryDatabase = os.Getenv("CLICKHOUSE_DATABASE") // typically 'default', clickhouse needs an existing database to handle connections TestDatabase = os.Getenv("CLICKHOUSE_TEST_DATABASE") Username = os.Getenv("CLICKHOUSE_USERNAME") Password = os.Getenv("CLICKHOUSE_PASSWORD") )
View Source
var BackendErrorObjectInputConfig = model.TableConfig[modelInputs.ReservedErrorsJoinedKey]{ KeysToColumns: map[modelInputs.ReservedErrorsJoinedKey]string{ modelInputs.ReservedErrorsJoinedKeyEnvironment: "Environment", modelInputs.ReservedErrorsJoinedKeyEvent: "Event", modelInputs.ReservedErrorsJoinedKeyHasSession: "SessionSecureID", modelInputs.ReservedErrorsJoinedKeyServiceName: "Service.Name", modelInputs.ReservedErrorsJoinedKeyServiceVersion: "Service.Version", modelInputs.ReservedErrorsJoinedKeyTimestamp: "Timestamp", modelInputs.ReservedErrorsJoinedKeyType: "Type", modelInputs.ReservedErrorsJoinedKeyVisitedURL: "URL", }, BodyColumn: "Event", ReservedKeys: modelInputs.AllReservedErrorsJoinedKey, }
View Source
var ErrorGroupsTableConfig = model.TableConfig[modelInputs.ReservedErrorGroupKey]{ TableName: ErrorGroupsTable, KeysToColumns: map[modelInputs.ReservedErrorGroupKey]string{ modelInputs.ReservedErrorGroupKeyEvent: "Event", modelInputs.ReservedErrorGroupKeySecureID: "SecureID", modelInputs.ReservedErrorGroupKeyStatus: "Status", modelInputs.ReservedErrorGroupKeyTag: "ErrorTagTitle", modelInputs.ReservedErrorGroupKeyType: "Type", }, BodyColumn: "Event", ReservedKeys: modelInputs.AllReservedErrorGroupKey, }
View Source
var ErrorObjectsTableConfig = model.TableConfig[modelInputs.ReservedErrorObjectKey]{ TableName: ErrorObjectsTable, KeysToColumns: map[modelInputs.ReservedErrorObjectKey]string{ modelInputs.ReservedErrorObjectKeyBrowser: "Browser", modelInputs.ReservedErrorObjectKeyClientID: "ClientID", modelInputs.ReservedErrorObjectKeyEnvironment: "Environment", modelInputs.ReservedErrorObjectKeyHasSession: "HasSession", modelInputs.ReservedErrorObjectKeyOsName: "OSName", modelInputs.ReservedErrorObjectKeySecureSessionID: "SecureSessionID", modelInputs.ReservedErrorObjectKeyServiceName: "ServiceName", modelInputs.ReservedErrorObjectKeyServiceVersion: "ServiceVersion", modelInputs.ReservedErrorObjectKeyTimestamp: "Timestamp", modelInputs.ReservedErrorObjectKeyTraceID: "TraceID", modelInputs.ReservedErrorObjectKeyVisitedURL: "VisitedURL", }, ReservedKeys: modelInputs.AllReservedErrorObjectKey, }
View Source
var ErrorsJoinedTableConfig = model.TableConfig[modelInputs.ReservedErrorsJoinedKey]{ TableName: "errors_joined_vw", KeysToColumns: map[modelInputs.ReservedErrorsJoinedKey]string{ modelInputs.ReservedErrorsJoinedKeyID: "ID", modelInputs.ReservedErrorsJoinedKeyBrowser: "Browser", modelInputs.ReservedErrorsJoinedKeyClientID: "ClientID", modelInputs.ReservedErrorsJoinedKeyEnvironment: "Environment", modelInputs.ReservedErrorsJoinedKeyEvent: "Event", modelInputs.ReservedErrorsJoinedKeyHasSession: "HasSession", modelInputs.ReservedErrorsJoinedKeyOsName: "OSName", modelInputs.ReservedErrorsJoinedKeySecureID: "SecureID", modelInputs.ReservedErrorsJoinedKeySecureSessionID: "SecureSessionID", modelInputs.ReservedErrorsJoinedKeyServiceName: "ServiceName", modelInputs.ReservedErrorsJoinedKeyServiceVersion: "ServiceVersion", modelInputs.ReservedErrorsJoinedKeyStatus: "Status", modelInputs.ReservedErrorsJoinedKeyTag: "ErrorTagTitle", modelInputs.ReservedErrorsJoinedKeyTimestamp: "Timestamp", modelInputs.ReservedErrorsJoinedKeyTraceID: "TraceID", modelInputs.ReservedErrorsJoinedKeyType: "Type", modelInputs.ReservedErrorsJoinedKeyVisitedURL: "VisitedURL", }, BodyColumn: "Event", ReservedKeys: modelInputs.AllReservedErrorsJoinedKey, }
View Source
var LogsTableConfig = model.TableConfig[modelInputs.ReservedLogKey]{ TableName: LogsTable, KeysToColumns: logKeysToColumns, ReservedKeys: modelInputs.AllReservedLogKey, BodyColumn: "Body", SeverityColumn: "SeverityText", AttributesColumn: "LogAttributes", SelectColumns: []string{ "ProjectId", "Timestamp", "UUID", "SeverityText", "Body", "LogAttributes", "TraceId", "SpanId", "SecureSessionId", "Source", "ServiceName", "ServiceVersion", "Environment", }, }
View Source
var SessionsJoinedTableConfig = model.TableConfig[modelInputs.ReservedSessionKey]{ TableName: SessionsJoinedTable, AttributesColumn: "SessionAttributes", BodyColumn: `concat(coalesce(nullif(SessionAttributes['email'],''), nullif(Identifier, ''), nullif(toString(Fingerprint), ''), 'unidentified'), ': ', City, if(City != '', ', ', ''), Country)`, KeysToColumns: map[modelInputs.ReservedSessionKey]string{ modelInputs.ReservedSessionKeyActiveLength: "ActiveLength", modelInputs.ReservedSessionKeyServiceVersion: "AppVersion", modelInputs.ReservedSessionKeyBrowserName: "BrowserName", modelInputs.ReservedSessionKeyBrowserVersion: "BrowserVersion", modelInputs.ReservedSessionKeyCity: "City", modelInputs.ReservedSessionKeyCountry: "Country", modelInputs.ReservedSessionKeyEnvironment: "Environment", modelInputs.ReservedSessionKeyExcluded: "Excluded", modelInputs.ReservedSessionKeyDeviceID: "Fingerprint", modelInputs.ReservedSessionKeyFirstTime: "FirstTime", modelInputs.ReservedSessionKeyHasComments: "HasComments", modelInputs.ReservedSessionKeyHasErrors: "HasErrors", modelInputs.ReservedSessionKeyHasRageClicks: "HasRageClicks", modelInputs.ReservedSessionKeyIdentified: "Identified", modelInputs.ReservedSessionKeyIdentifier: "Identifier", modelInputs.ReservedSessionKeyIP: "IP", modelInputs.ReservedSessionKeyLength: "Length", modelInputs.ReservedSessionKeyNormalness: "Normalness", modelInputs.ReservedSessionKeyOsName: "OSName", modelInputs.ReservedSessionKeyOsVersion: "OSVersion", modelInputs.ReservedSessionKeyPagesVisited: "PagesVisited", modelInputs.ReservedSessionKeyProcessed: "Processed", modelInputs.ReservedSessionKeySecureID: "SecureID", modelInputs.ReservedSessionKeyLocState: "State", modelInputs.ReservedSessionKeyViewed: "Viewed", modelInputs.ReservedSessionKeyWithinBillingQuota: "WithinBillingQuota", }, ReservedKeys: modelInputs.AllReservedSessionKey, IgnoredFilters: map[string]bool{ modelInputs.ReservedSessionKeySample.String(): true, modelInputs.ReservedSessionKeyViewedByMe.String(): true, }, }
View Source
var SessionsTableConfig = model.TableConfig[string]{ TableName: SessionsTable, KeysToColumns: fieldMap, AttributesColumn: "Fields", ReservedKeys: lo.Map(modelInputs.AllReservedSessionKey, func(item modelInputs.ReservedSessionKey, _ int) string { return item.String() }), }
View Source
var TracesTableConfig = model.TableConfig[modelInputs.ReservedTraceKey]{ TableName: TracesTableNoDefaultConfig.TableName, KeysToColumns: TracesTableNoDefaultConfig.KeysToColumns, ReservedKeys: TracesTableNoDefaultConfig.ReservedKeys, BodyColumn: TracesTableNoDefaultConfig.BodyColumn, AttributesColumn: TracesTableNoDefaultConfig.AttributesColumn, SelectColumns: TracesTableNoDefaultConfig.SelectColumns, DefaultFilter: fmt.Sprintf("%s!=%s %s!=%s", modelInputs.ReservedTraceKeySpanName, highlight.MetricSpanName, highlight.TraceTypeAttribute, highlight.TraceTypeHighlightInternal), }
View Source
var TracesTableNoDefaultConfig = model.TableConfig[modelInputs.ReservedTraceKey]{ TableName: TracesTable, KeysToColumns: traceKeysToColumns, ReservedKeys: modelInputs.AllReservedTraceKey, BodyColumn: "SpanName", AttributesColumn: "TraceAttributes", SelectColumns: traceColumns, }
Functions ¶
func ErrorMatchesQuery ¶
func ErrorMatchesQuery(errorObject *model2.BackendErrorObjectInput, filters listener.Filters) bool
func GetPostgresConnectionString ¶
func GetPostgresConnectionString() string
func GetSessionsQueryImpl ¶
func KeyValuesAggregated ¶
func KeysAggregated ¶
func RunMigrations ¶
func SessionMatchesQuery ¶
Types ¶
type ClickhouseErrorGroup ¶
type ClickhouseErrorObject ¶
type ClickhouseField ¶
type ClickhouseSession ¶
type ClickhouseSession struct { ID int64 Fingerprint int32 ProjectID int32 PagesVisited int32 ViewedByAdmins clickhouse.ArraySet FieldKeys clickhouse.ArraySet FieldKeyValues clickhouse.ArraySet CreatedAt int64 UpdatedAt int64 SecureID string Identified bool Identifier string IP string City string State string Country string OSName string OSVersion string BrowserName string BrowserVersion string Processed *bool HasComments bool HasRageClicks *bool HasErrors *bool Length int64 ActiveLength int64 Environment string AppVersion *string FirstTime *bool Viewed *bool WithinBillingQuota *bool EventCounts *string Excluded bool Normalness *float64 }
type ClickhouseTraceRow ¶
type ClickhouseTraceRow struct { Timestamp time.Time UUID string TraceId string SpanId string ParentSpanId string ProjectId uint32 SecureSessionId string TraceState string SpanName string SpanKind string Duration int64 ServiceName string ServiceVersion string TraceAttributes map[string]string StatusCode string StatusMessage string Environment string HasErrors bool EventsTimestamp clickhouse.ArraySet `ch:"Events.Timestamp"` EventsName clickhouse.ArraySet `ch:"Events.Name"` EventsAttributes clickhouse.ArraySet `ch:"Events.Attributes"` LinksTraceId clickhouse.ArraySet `ch:"Links.TraceId"` LinksSpanId clickhouse.ArraySet `ch:"Links.SpanId"` LinksTraceState clickhouse.ArraySet `ch:"Links.TraceState"` LinksAttributes clickhouse.ArraySet `ch:"Links.Attributes"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func SetupClickhouseTestDB ¶
func (*Client) BatchWriteLogRows ¶
func (*Client) BatchWriteTraceRows ¶
func (*Client) DeleteSessions ¶
func (*Client) ErrorsKeyValues ¶
func (*Client) ErrorsLogLines ¶
func (client *Client) ErrorsLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
func (*Client) ExistingTraceIds ¶
func (*Client) LogsKeyValues ¶
func (*Client) LogsLogLines ¶
func (client *Client) LogsLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
func (*Client) QueryErrorFieldValues ¶
func (*Client) QueryErrorGroupAggregateFrequency ¶
func (client *Client) QueryErrorGroupAggregateFrequency(ctx context.Context, projectId int, errorGroupIds []int) ([]*modelInputs.ErrorDistributionItem, error)
func (*Client) QueryErrorGroupFrequencies ¶
func (client *Client) QueryErrorGroupFrequencies(ctx context.Context, projectId int, errorGroupIds []int, params modelInputs.ErrorGroupFrequenciesParamsInput) ([]*modelInputs.ErrorDistributionItem, error)
func (*Client) QueryErrorGroupIdsDeprecated ¶
func (*Client) QueryErrorGroupOccurrences ¶
func (*Client) QueryErrorGroupTags ¶
func (client *Client) QueryErrorGroupTags(ctx context.Context, projectId int, errorGroupId int) ([]*modelInputs.ErrorGroupTagAggregation, error)
func (*Client) QueryErrorGroups ¶
func (*Client) QueryErrorHistogramDeprecated ¶
func (client *Client) QueryErrorHistogramDeprecated(ctx context.Context, projectId int, query modelInputs.ClickhouseQuery, options modelInputs.DateHistogramOptions) ([]time.Time, []int64, error)
func (*Client) QueryErrorObjectsHistogram ¶
func (client *Client) QueryErrorObjectsHistogram(ctx context.Context, projectId int, params modelInputs.QueryInput, options modelInputs.DateHistogramOptions) ([]time.Time, []int64, error)
func (*Client) QueryFieldNames ¶
func (*Client) QueryFieldValues ¶
func (*Client) QuerySessionCustomMetrics ¶
func (*Client) QuerySessionHistogram ¶
func (client *Client) QuerySessionHistogram(ctx context.Context, admin *model.Admin, projectId int, params modelInputs.QueryInput, retentionDate time.Time, options modelInputs.DateHistogramOptions) ([]time.Time, []int64, []int64, []int64, error)
func (*Client) QuerySessionHistogramDeprecated ¶
func (client *Client) QuerySessionHistogramDeprecated(ctx context.Context, admin *model.Admin, projectId int, query modelInputs.ClickhouseQuery, retentionDate time.Time, options modelInputs.DateHistogramOptions) ([]time.Time, []int64, []int64, []int64, error)
func (*Client) QuerySessionIds ¶
func (*Client) QuerySessionIdsDeprecated ¶
func (*Client) ReadErrorsMetrics ¶
func (client *Client) ReadErrorsMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, column string, metricTypes []modelInputs.MetricAggregator, groupBy []string, nBuckets *int, bucketBy string, limit *int, limitAggregator *modelInputs.MetricAggregator, limitColumn *string) (*modelInputs.MetricsBuckets, error)
func (*Client) ReadLogs ¶
func (client *Client) ReadLogs(ctx context.Context, projectID int, params modelInputs.QueryInput, pagination Pagination) (*modelInputs.LogConnection, error)
func (*Client) ReadLogsDailyAverage ¶
func (client *Client) ReadLogsDailyAverage(ctx context.Context, projectIds []int, dateRange modelInputs.DateRangeRequiredInput) (float64, error)
func (*Client) ReadLogsDailySum ¶
func (client *Client) ReadLogsDailySum(ctx context.Context, projectIds []int, dateRange modelInputs.DateRangeRequiredInput) (uint64, error)
func (*Client) ReadLogsHistogram ¶
func (client *Client) ReadLogsHistogram(ctx context.Context, projectID int, params modelInputs.QueryInput, nBuckets int) (*modelInputs.LogsHistogram, error)
func (*Client) ReadLogsMetrics ¶
func (client *Client) ReadLogsMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, column string, metricTypes []modelInputs.MetricAggregator, groupBy []string, nBuckets *int, bucketBy string, limit *int, limitAggregator *modelInputs.MetricAggregator, limitColumn *string) (*modelInputs.MetricsBuckets, error)
func (*Client) ReadLogsTotalCount ¶
func (client *Client) ReadLogsTotalCount(ctx context.Context, projectID int, params modelInputs.QueryInput) (uint64, error)
func (*Client) ReadSessionLogs ¶
func (client *Client) ReadSessionLogs(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogEdge, error)
This is a lighter weight version of the previous function for loading the minimal about of data for a session
func (*Client) ReadSessionsMetrics ¶
func (client *Client) ReadSessionsMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, column string, metricTypes []modelInputs.MetricAggregator, groupBy []string, nBuckets *int, bucketBy string, limit *int, limitAggregator *modelInputs.MetricAggregator, limitColumn *string) (*modelInputs.MetricsBuckets, error)
func (*Client) ReadTraces ¶
func (client *Client) ReadTraces(ctx context.Context, projectID int, params modelInputs.QueryInput, pagination Pagination) (*modelInputs.TraceConnection, error)
func (*Client) ReadTracesDailyAverage ¶
func (client *Client) ReadTracesDailyAverage(ctx context.Context, projectIds []int, dateRange modelInputs.DateRangeRequiredInput) (float64, error)
func (*Client) ReadTracesDailySum ¶
func (client *Client) ReadTracesDailySum(ctx context.Context, projectIds []int, dateRange modelInputs.DateRangeRequiredInput) (uint64, error)
func (*Client) ReadTracesMetrics ¶
func (client *Client) ReadTracesMetrics(ctx context.Context, projectID int, params modelInputs.QueryInput, column string, metricTypes []modelInputs.MetricAggregator, groupBy []string, nBuckets *int, bucketBy string, limit *int, limitAggregator *modelInputs.MetricAggregator, limitColumn *string) (*modelInputs.MetricsBuckets, error)
func (*Client) ReadWorkspaceErrorCounts ¶
func (client *Client) ReadWorkspaceErrorCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
func (*Client) ReadWorkspaceLogCounts ¶
func (client *Client) ReadWorkspaceLogCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
func (*Client) ReadWorkspaceSessionCounts ¶
func (client *Client) ReadWorkspaceSessionCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
func (*Client) ReadWorkspaceTraceCounts ¶
func (client *Client) ReadWorkspaceTraceCounts(ctx context.Context, projectIDs []int, params modelInputs.QueryInput) (*modelInputs.MetricsBuckets, error)
func (*Client) SessionsKeyValues ¶
func (*Client) SessionsKeys ¶
func (*Client) SessionsLogLines ¶
func (client *Client) SessionsLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
func (*Client) TracesKeyValues ¶
func (*Client) TracesKeys ¶
func (*Client) TracesLogLines ¶
func (client *Client) TracesLogLines(ctx context.Context, projectID int, params modelInputs.QueryInput) ([]*modelInputs.LogLine, error)
func (*Client) TracesMetrics ¶
func (*Client) WriteErrorGroups ¶
func (*Client) WriteErrorObjects ¶
type Connection ¶
type Connection[T interface{}] struct { Edges []*Edge[T] PageInfo *modelInputs.PageInfo }
type LogRow ¶
type LogRow struct { Timestamp time.Time ProjectId uint32 TraceId string SpanId string SecureSessionId string UUID string TraceFlags uint32 SeverityText string SeverityNumber int32 Source modelInputs.LogSource ServiceName string ServiceVersion string Body string LogAttributes map[string]string Environment string }
type LogRowOption ¶
type LogRowOption func(*LogRow)
func WithEnvironment ¶
func WithEnvironment(environment string) LogRowOption
func WithLogAttributes ¶
func WithLogAttributes(attributes map[string]string) LogRowOption
func WithSecureSessionID ¶
func WithSecureSessionID(secureSessionID string) LogRowOption
func WithServiceName ¶
func WithServiceName(serviceName string) LogRowOption
func WithServiceVersion ¶
func WithServiceVersion(version string) LogRowOption
func WithSeverityText ¶
func WithSeverityText(severityText string) LogRowOption
func WithSource ¶
func WithSource(source modelInputs.LogSource) LogRowOption
func WithSpanID ¶
func WithSpanID(spanID string) LogRowOption
func WithTraceID ¶
func WithTraceID(traceID string) LogRowOption
type Operator ¶
type Operator string
const ( Is Operator = "is" Contains Operator = "contains" Exists Operator = "exists" Between Operator = "between" BetweenTime Operator = "between_time" BetweenDate Operator = "between_date" Matches Operator = "matches" IsNot Operator = "is_not" NotContains Operator = "not_contains" NotExists Operator = "not_exists" NotBetween Operator = "not_between" NotBetweenTime Operator = "not_between_time" NotBetweenDate Operator = "not_between_date" NotMatches Operator = "not_matches" )
type Pagination ¶
type Pagination struct { After *string Before *string At *string Direction modelInputs.SortDirection CountOnly bool }
type TraceRow ¶
type TraceRow struct { Timestamp time.Time UUID string TraceId string SpanId string ParentSpanId string TraceState string SpanName string SpanKind string ServiceName string ServiceVersion string TraceAttributes map[string]string Duration int64 StatusCode string StatusMessage string Events []*Event Links []*Link ProjectId uint32 SecureSessionId string Environment string HasErrors bool }
func (*TraceRow) WithDuration ¶
func (*TraceRow) WithEnvironment ¶
func (*TraceRow) WithHasErrors ¶
func (*TraceRow) WithParentSpanId ¶
func (*TraceRow) WithSecureSessionId ¶
func (*TraceRow) WithServiceName ¶
func (*TraceRow) WithServiceVersion ¶
func (*TraceRow) WithSpanId ¶
func (*TraceRow) WithSpanKind ¶
func (*TraceRow) WithSpanName ¶
func (*TraceRow) WithStatusCode ¶
func (*TraceRow) WithStatusMessage ¶
func (*TraceRow) WithTraceAttributes ¶
func (*TraceRow) WithTraceId ¶
func (*TraceRow) WithTraceState ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.