telemetry

package
v0.0.0-...-cb9b695 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionCreateFlow            = "create_flow"
	ActionResyncFlow            = "resync_flow"
	ActionPauseFlow             = "pause_flow"
	ActionResumeFlow            = "resume_flow"
	ActionTerminateFlow         = "terminate_flow"
	ActionStartFlowConfigUpdate = "start_flow_config_update"
	ActionUpdateFlowConfig      = "update_flow_config"
	ActionStartMaintenance      = "start_maintenance"
	ActionEndMaintenance        = "end_maintenance"
	ActionSkipSnapshotWaitFlows = "skip_snapshot_wait_flows"
	ActionCreatePeer            = "create_peer"
	ActionDropPeer              = "drop_peer"
)
View Source
const (
	INFO     Level = "INFO"
	WARN     Level = "WARN"
	ERROR    Level = "ERROR"
	CRITICAL Level = "CRITICAL"

	// ClickHouse (incident.io) mapped alert levels
	IncMedium   IncidentIoLevel = "medium"
	IncWarning  IncidentIoLevel = "warning"
	IncHigh     IncidentIoLevel = "high"
	IncCritical IncidentIoLevel = "critical"
)

Variables

This section is empty.

Functions

func LogActivityCreateFlow

func LogActivityCreateFlow(ctx context.Context, flowName string)

func LogActivityCreatePeer

func LogActivityCreatePeer(ctx context.Context)

func LogActivityDropPeer

func LogActivityDropPeer(ctx context.Context)

func LogActivityEndMaintenance

func LogActivityEndMaintenance(ctx context.Context)

func LogActivityPauseFlow

func LogActivityPauseFlow(ctx context.Context, flowName string)

func LogActivityResumeFlow

func LogActivityResumeFlow(ctx context.Context, flowName string)

func LogActivityResyncFlow

func LogActivityResyncFlow(ctx context.Context, flowName string)

func LogActivitySkipSnapshotWaitFlows

func LogActivitySkipSnapshotWaitFlows(ctx context.Context)

func LogActivityStartFlowConfigUpdate

func LogActivityStartFlowConfigUpdate(ctx context.Context, flowName string, update *protos.CDCFlowConfigUpdate)

func LogActivityStartMaintenance

func LogActivityStartMaintenance(ctx context.Context)

func LogActivityTerminateFlow

func LogActivityTerminateFlow(ctx context.Context, flowName string)

func LogActivityUpdateFlowConfig

func LogActivityUpdateFlowConfig(ctx context.Context, flowName string, oldValues OldCDCFlowValues, update *protos.CDCFlowConfigUpdate)

func LogFlowConfigs

func LogFlowConfigs(ctx context.Context, catalogPool shared.CatalogPool) error

Types

type Attributes

type Attributes struct {
	DeploymentUID string
	Type          string
	Level         Level
	Tags          []string
}

type EventType

type EventType string
const (
	CreatePeer       EventType = "CreatePeer"
	CreateMirror     EventType = "CreateMirror"
	StartMaintenance EventType = "StartMaintenance"
	EndMaintenance   EventType = "EndMaintenance"
	MaintenanceWait  EventType = "MaintenanceWait"

	Other EventType = "Other"
)

type FlowConfigForLogging

type FlowConfigForLogging struct {
	FlowName                    string `json:"flow_name"`
	PublicationName             string `json:"pg_publication_name"`
	ReplicationSlotName         string `json:"pg_replication_slot_name"`
	IdleTimeoutSeconds          uint64 `json:"sync_interval"`
	MaxBatchSize                uint32 `json:"max_batch_size"`
	SnapshotNumRowsPerPartition uint32 `json:"snapshot_num_rows_per_partition"`
	SnapshotMaxParallelWorkers  uint32 `json:"snapshot_max_parallel_workers"`
	SnapshotNumTablesInParallel uint32 `json:"snapshot_num_tables_in_parallel"`
	CdcOnly                     bool   `json:"cdc_only"`
	SnapshotOnly                bool   `json:"snapshot_only"`
	Resync                      bool   `json:"is_resync"`
	NumTables                   int    `json:"num_tables"`
}

type IncidentIoAlert

type IncidentIoAlert struct {
	Metadata         map[string]string `json:"metadata"`
	Title            string            `json:"title"`
	Description      string            `json:"description"`
	DeduplicationKey string            `json:"deduplication_key"`
	Status           string            `json:"status"`
}

type IncidentIoLevel

type IncidentIoLevel string

func ResolveIncidentIoLevels

func ResolveIncidentIoLevels(level Level) IncidentIoLevel

type IncidentIoMessageSender

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

func (*IncidentIoMessageSender) SendMessage

func (i *IncidentIoMessageSender) SendMessage(
	ctx context.Context,
	subject string,
	body string,
	attributes Attributes,
) (string, error)

type IncidentIoMessageSenderConfig

type IncidentIoMessageSenderConfig struct {
	URL   string
	Token string
}

type IncidentIoResponse

type IncidentIoResponse struct {
	Status           string `json:"status"`
	Message          string `json:"message"`
	DeduplicationKey string `json:"deduplication_key"`
}

type Level

type Level string

type OldCDCFlowValues

type OldCDCFlowValues struct {
	Env                           map[string]string
	IdleTimeout                   uint64
	BatchSize                     uint32
	SnapshotNumRowsPerPartition   uint32
	SnapshotNumPartitionsOverride uint32
	SnapshotMaxParallelWorkers    uint32
	SnapshotNumTablesInParallel   uint32
}

type SNSMessageSender

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

func NewSNSMessageSenderWithNewClient

func NewSNSMessageSenderWithNewClient(ctx context.Context, config *SNSMessageSenderConfig) (*SNSMessageSender, error)

func (*SNSMessageSender) SendMessage

func (s *SNSMessageSender) SendMessage(ctx context.Context, subject string, body string, attributes Attributes) (string, error)

type SNSMessageSenderConfig

type SNSMessageSenderConfig struct {
	Topic string `json:"topic"`
}

type Sender

type Sender interface {
	SendMessage(ctx context.Context, subject string, body string, attributes Attributes) (string, error)
}

type TableMappingForLogging

type TableMappingForLogging struct {
	TableName     string   `json:"table_name"`
	DestTableName string   `json:"destination_table_name"`
	PartitionKey  string   `json:"partition_key"`
	Engine        string   `json:"engine"`
	Exclude       []string `json:"excluded_columns"`
}

Jump to

Keyboard shortcuts

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