reporting

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ABTestResult

type ABTestResult struct {
	DashboardA string `json:"dashboard_a"`

	DashboardB string `json:"dashboard_b"`

	StartTime time.Time `json:"start_time"`

	EndTime time.Time `json:"end_time"`

	TrafficSplitA float64 `json:"traffic_split_a"`

	TrafficSplitB float64 `json:"traffic_split_b"`

	MetricsA map[string]float64 `json:"metrics_a"`

	MetricsB map[string]float64 `json:"metrics_b"`

	Winner string `json:"winner"`

	Confidence float64 `json:"confidence"`

	Metadata json.RawMessage `json:"metadata"`
}

type ABTestingConfig

type ABTestingConfig struct {
	Enabled bool `yaml:"enabled"`

	TrafficSplit float64 `yaml:"traffic_split"`

	TestDuration string `yaml:"test_duration"`

	MetricsEndpoint string `yaml:"metrics_endpoint"`
}

type AccessControlConfig

type AccessControlConfig struct {
	RBAC bool `yaml:"rbac"`

	MFA bool `yaml:"mfa"`

	SessionTimeout time.Duration `yaml:"session_timeout"`

	Permissions map[string][]string `yaml:"permissions"`
}

type AggregationConfig

type AggregationConfig struct {
	Name string `yaml:"name"`

	Metrics []string `yaml:"metrics"`

	Function string `yaml:"function"` // sum, avg, max, min, count

	Window time.Duration `yaml:"window"`

	GroupBy []string `yaml:"group_by"`
}

type Aggregator

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

type AlertCondition

type AlertCondition struct {
	Query AlertQuery `json:"query"`

	Reducer AlertReducer `json:"reducer"`

	Evaluator AlertEvaluator `json:"evaluator"`
}

type AlertEvaluator

type AlertEvaluator struct {
	Params []float64 `json:"params"`

	Type string `json:"type"`
}

type AlertInfo

type AlertInfo struct {
	Name string `json:"name"`

	Severity string `json:"severity"`

	Component string `json:"component"`

	Count int `json:"count"`

	LastFired time.Time `json:"lastFired"`

	Duration time.Duration `json:"duration"`

	Description string `json:"description"`
}

type AlertQuery

type AlertQuery struct {
	QueryType string `json:"queryType"`

	RefID string `json:"refId"`

	Model json.RawMessage `json:"model"`
}

type AlertReducer

type AlertReducer struct {
	Type string `json:"type"`

	Params []interface{} `json:"params"`
}

type AlertTrends

type AlertTrends struct {
	HourlyTrend []int `json:"hourlyTrend"` // Alerts per hour for last 24 hours

	DailyTrend []int `json:"dailyTrend"` // Alerts per day for last 7 days

	WeeklyTrend []int `json:"weeklyTrend"` // Alerts per week for last 4 weeks
}

type AlertsSummary

type AlertsSummary struct {
	TotalAlerts int `json:"totalAlerts"`

	CriticalAlerts int `json:"criticalAlerts"`

	WarningAlerts int `json:"warningAlerts"`

	ResolvedAlerts int `json:"resolvedAlerts"`

	AlertsByComponent map[string]int `json:"alertsByComponent"`

	AlertTrends AlertTrends `json:"alertTrends"`

	TopAlerts []AlertInfo `json:"topAlerts"`

	MTTR float64 `json:"mttr"` // Mean Time To Resolution (minutes)
}

type Attestation

type Attestation struct {
	ID string `json:"id"`

	Timestamp time.Time `json:"timestamp"`

	Attestor string `json:"attestor"`

	Framework ComplianceFramework `json:"framework"`

	Period Period `json:"period"`

	Statement string `json:"statement"`

	Signature string `json:"signature"`

	ValidUntil time.Time `json:"valid_until"`

	CertificateChain []string `json:"certificate_chain"`
}

type AttestationConfig

type AttestationConfig struct {
	Enabled bool `yaml:"enabled"`

	SigningKey string `yaml:"signing_key"`

	ValidityPeriod time.Duration `yaml:"validity_period"`

	RenewalThreshold time.Duration `yaml:"renewal_threshold"`
}

type AttestationManager

type AttestationManager interface {
	Create(report ComplianceReport) (*Attestation, error)

	Verify(attestation Attestation) (bool, error)

	Renew(id string) (*Attestation, error)

	Revoke(id string) error
}

type AuditEvent

type AuditEvent struct {
	ID string `json:"id"`

	Timestamp time.Time `json:"timestamp"`

	User string `json:"user"`

	Action string `json:"action"`

	Resource string `json:"resource"`

	Result string `json:"result"`

	Details string `json:"details"`

	IP string `json:"ip"`

	UserAgent string `json:"user_agent"`

	Metadata json.RawMessage `json:"metadata"`
}

type BaselineComparison

type BaselineComparison struct {
	BaselinePeriod string `json:"baselinePeriod"`

	BaselineMetrics map[string]float64 `json:"baselineMetrics"`

	CurrentMetrics map[string]float64 `json:"currentMetrics"`

	PercentageChanges map[string]float64 `json:"percentageChanges"`

	SignificantChanges []string `json:"significantChanges"`
}

type BatchConfig

type BatchConfig struct {
	Enabled bool `yaml:"enabled"`

	Interval time.Duration `yaml:"interval"`

	BatchSize int `yaml:"batch_size"`

	Retention time.Duration `yaml:"retention"`
}

type BusinessImpact

type BusinessImpact struct {
	CostPerIntent float64 `json:"costPerIntent,omitempty"` // dollars

	RevenueImpact float64 `json:"revenueImpact"` // dollars per hour

	SLAViolationCost float64 `json:"slaViolationCost,omitempty"` // dollars

	PerformanceROI float64 `json:"performanceROI,omitempty"` // percentage

	CustomerSatisfaction float64 `json:"customerSatisfaction,omitempty"` // 0-100 score

	CustomersAffected int64 `json:"customersAffected,omitempty"`

	TransactionsLost int64 `json:"transactionsLost,omitempty"`

	ReputationScore float64 `json:"reputationScore,omitempty"` // 0-100 score

	CompetitivePosition string `json:"competitivePosition,omitempty"` // Leading, Competitive, Lagging
}

type BusinessMetrics

type BusinessMetrics struct {
	TotalRevenue float64 `json:"total_revenue"`

	RevenueAtRisk float64 `json:"revenue_at_risk"`

	CustomerSatisfaction float64 `json:"customer_satisfaction"`

	CompetitivePosition string `json:"competitive_position"`
}

type CacheSystemMetrics

type CacheSystemMetrics struct {
	HitRate float64 `json:"hitRate"` // percentage

	MissRate float64 `json:"missRate"` // percentage

	AverageLatency float64 `json:"averageLatency"` // ms

	CacheSize int64 `json:"cacheSize"` // bytes

	EvictionRate float64 `json:"evictionRate"` // evictions/sec

	HitLatency float64 `json:"hitLatency"` // ms

	MissLatency float64 `json:"missLatency"` // ms
}

type CapacityAnalysis

type CapacityAnalysis struct {
	CurrentCapacity float64 `json:"currentCapacity"` // percentage

	PeakCapacity float64 `json:"peakCapacity"` // percentage

	CapacityTrend string `json:"capacityTrend"` // Increasing, Stable, Decreasing

	EstimatedExhaustion *time.Time `json:"estimatedExhaustion,omitempty"`

	ScalingRecommendations []ScalingRecommendation `json:"scalingRecommendations"`

	ResourceBottlenecks []ResourceBottleneck `json:"resourceBottlenecks"`
}

type ClaimValidation

type ClaimValidation struct {
	ID string `json:"id"`

	Name string `json:"name"`

	Target string `json:"target"`

	Actual string `json:"actual"`

	Status string `json:"status"` // PASS, FAIL, WARNING

	Confidence float64 `json:"confidence"` // 0-100%

	Trend string `json:"trend"` // Improving, Stable, Degrading

	LastFailure *time.Time `json:"lastFailure,omitempty"`

	FailureCount int `json:"failureCount"`
}

type ComplianceConfig

type ComplianceConfig struct {
	Frameworks []ComplianceFramework `yaml:"frameworks"`

	AuditRetention time.Duration `yaml:"audit_retention"`

	ReportSchedule ReportScheduleConfig `yaml:"report_schedule"`

	Attestation AttestationConfig `yaml:"attestation"`

	DataRetention DataRetentionConfig `yaml:"data_retention"`

	Encryption EncryptionConfig `yaml:"encryption"`

	AccessControl AccessControlConfig `yaml:"access_control"`
}

type ComplianceDataPoint

type ComplianceDataPoint struct {
	Timestamp time.Time `json:"timestamp"`

	Score float64 `json:"score"`

	Status ComplianceStatus `json:"status"`
}

type ComplianceFramework

type ComplianceFramework string
const (
	SOX ComplianceFramework = "sox"

	PCIDSS ComplianceFramework = "pci-dss"

	ISO27001 ComplianceFramework = "iso-27001"

	HIPAA ComplianceFramework = "hipaa"

	GDPR ComplianceFramework = "gdpr"

	NIST ComplianceFramework = "nist"

	FedRAMP ComplianceFramework = "fedramp"

	SOC2 ComplianceFramework = "soc2"
)

type ComplianceMetrics

type ComplianceMetrics struct {
	Total int `json:"total"`

	Compliant int `json:"compliant"`

	Percentage float64 `json:"percentage"`
}

type ComplianceRecommendation

type ComplianceRecommendation struct {
	ID string `json:"id"`

	Priority string `json:"priority"`

	Category string `json:"category"`

	Title string `json:"title"`

	Description string `json:"description"`

	Impact string `json:"impact"`

	Effort string `json:"effort"`

	DueDate time.Time `json:"due_date"`

	Owner string `json:"owner"`
}

type ComplianceReport

type ComplianceReport struct {
	ID string `json:"id"`

	GeneratedAt time.Time `json:"generated_at"`

	Period Period `json:"period"`

	Framework ComplianceFramework `json:"framework"`

	OverallStatus ComplianceStatus `json:"overall_status"`

	ComplianceScore float64 `json:"compliance_score"`

	Requirements []ComplianceRequirement `json:"requirements"`

	Summary ComplianceSummary `json:"summary"`

	AuditTrail []AuditEvent `json:"audit_trail"`

	Attestation *Attestation `json:"attestation,omitempty"`

	Recommendations []ComplianceRecommendation `json:"recommendations"`

	Metadata json.RawMessage `json:"metadata"`
}

type ComplianceReporter

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

func NewComplianceReporter

func NewComplianceReporter(config ComplianceConfig, logger *logrus.Logger) *ComplianceReporter

func (*ComplianceReporter) AssessCompliance

func (cr *ComplianceReporter) AssessCompliance(requirementID string) (*ComplianceRequirement, error)

func (*ComplianceReporter) CollectEvidence

func (cr *ComplianceReporter) CollectEvidence(requirementID string, evidence Evidence) error

func (*ComplianceReporter) GenerateComplianceReport

func (cr *ComplianceReporter) GenerateComplianceReport(framework ComplianceFramework, period Period) (*ComplianceReport, error)

func (*ComplianceReporter) GetComplianceStatus

func (cr *ComplianceReporter) GetComplianceStatus() map[ComplianceFramework]ComplianceStatus

func (*ComplianceReporter) RecordAuditEvent

func (cr *ComplianceReporter) RecordAuditEvent(event AuditEvent) error

func (*ComplianceReporter) Start

func (cr *ComplianceReporter) Start(ctx context.Context) error

func (*ComplianceReporter) Stop

func (cr *ComplianceReporter) Stop()

type ComplianceRequirement

type ComplianceRequirement struct {
	ID string `json:"id"`

	Framework ComplianceFramework `json:"framework"`

	Title string `json:"title"`

	Description string `json:"description"`

	Category string `json:"category"`

	Severity string `json:"severity"` // critical, high, medium, low

	Status ComplianceStatus `json:"status"`

	Evidence []Evidence `json:"evidence"`

	Controls []Control `json:"controls"`

	LastAssessed time.Time `json:"last_assessed"`

	NextAssessment time.Time `json:"next_assessment"`

	Remediation *RemediationPlan `json:"remediation,omitempty"`

	Metadata json.RawMessage `json:"metadata"`
}

type ComplianceStatus

type ComplianceStatus string
const (
	StatusCompliant ComplianceStatus = "compliant"

	StatusNonCompliant ComplianceStatus = "non_compliant"

	StatusPartiallyCompliant ComplianceStatus = "partially_compliant"

	StatusNotAssessed ComplianceStatus = "not_assessed"

	StatusInProgress ComplianceStatus = "in_progress"

	StatusExempt ComplianceStatus = "exempt"
)

type ComplianceSummary

type ComplianceSummary struct {
	TotalRequirements int `json:"total_requirements"`

	CompliantRequirements int `json:"compliant_requirements"`

	NonCompliantRequirements int `json:"non_compliant_requirements"`

	ExemptRequirements int `json:"exempt_requirements"`

	ComplianceByCategory map[string]ComplianceMetrics `json:"compliance_by_category"`

	ComplianceTrend []ComplianceDataPoint `json:"compliance_trend"`

	RiskAssessment RiskAssessment `json:"risk_assessment"`
}

type CompressionConfig

type CompressionConfig struct {
	Enabled bool `yaml:"enabled"`

	Algorithm string `yaml:"algorithm"` // gzip, snappy, lz4

	Level int `yaml:"level"`

	MinSize int `yaml:"min_size"`
}

type ConfidenceInterval

type ConfidenceInterval struct {
	Lower float64 `json:"lower"`

	Upper float64 `json:"upper"`

	Level float64 `json:"level"` // 95%, 99%, etc.
}

type Control

type Control struct {
	ID string `json:"id"`

	Name string `json:"name"`

	Description string `json:"description"`

	Implementation string `json:"implementation"`

	Status string `json:"status"` // active, inactive, disabled

	Effectiveness string `json:"effectiveness"` // effective, partially_effective, ineffective

	LastTested time.Time `json:"last_tested"`

	NextTest time.Time `json:"next_test"`

	TestResults []TestResult `json:"test_results"`

	Metadata json.RawMessage `json:"metadata"`
}

type CustomConfig

type CustomConfig struct {
	Name string `yaml:"name"`

	URL string `yaml:"url"`

	Method string `yaml:"method"`

	Headers map[string]string `yaml:"headers"`

	Format string `yaml:"format"`

	Template string `yaml:"template"`
}

type CustomExporter

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

func (*CustomExporter) Export

func (ce *CustomExporter) Export(ctx context.Context, batch MetricBatch) (*ExportResult, error)

func (*CustomExporter) HealthCheck

func (ce *CustomExporter) HealthCheck(ctx context.Context) error

func (*CustomExporter) Name

func (ce *CustomExporter) Name() string

type Dashboard

type Dashboard struct {
	ID int `json:"id,omitempty"`

	UID string `json:"uid,omitempty"`

	Title string `json:"title"`

	Tags []string `json:"tags,omitempty"`

	Templating DashboardTemplating `json:"templating"`

	Panels []DashboardPanel `json:"panels"`

	Time DashboardTimeRange `json:"time"`

	Refresh string `json:"refresh"`

	SchemaVersion int `json:"schemaVersion"`

	Version int `json:"version"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type DashboardConfig

type DashboardConfig struct {
	GrafanaURL string `yaml:"grafana_url"`

	APIKey string `yaml:"api_key"`

	OrgID int `yaml:"org_id"`

	DashboardPath string `yaml:"dashboard_path"`

	Templates TemplateConfig `yaml:"templates"`

	RBAC RBACConfig `yaml:"rbac"`

	Monitoring MonitoringConfig `yaml:"monitoring"`

	ABTesting ABTestingConfig `yaml:"ab_testing"`
}

type DashboardManager

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

func NewDashboardManager

func NewDashboardManager(config DashboardConfig, logger *logrus.Logger) (*DashboardManager, error)

func (*DashboardManager) CreateDashboard

func (dm *DashboardManager) CreateDashboard(ctx context.Context, templateName string, variables map[string]interface{}) (*Dashboard, error)

func (*DashboardManager) DeleteDashboard

func (dm *DashboardManager) DeleteDashboard(ctx context.Context, uid string) error

func (*DashboardManager) GetDashboard

func (dm *DashboardManager) GetDashboard(uid string) (*Dashboard, error)

func (*DashboardManager) GetDashboardStatus

func (dm *DashboardManager) GetDashboardStatus(uid string) (*DashboardStatus, error)

func (*DashboardManager) ListDashboards

func (dm *DashboardManager) ListDashboards() []*Dashboard

func (*DashboardManager) Start

func (dm *DashboardManager) Start(ctx context.Context) error

func (*DashboardManager) StartABTest

func (dm *DashboardManager) StartABTest(ctx context.Context, dashboardA, dashboardB string, duration time.Duration) (*ABTestResult, error)

func (*DashboardManager) Stop

func (dm *DashboardManager) Stop()

func (*DashboardManager) UpdateDashboard

func (dm *DashboardManager) UpdateDashboard(ctx context.Context, uid string, dashboard *Dashboard) error

type DashboardPanel

type DashboardPanel struct {
	ID int `json:"id"`

	Title string `json:"title"`

	Type string `json:"type"`

	DataSource string `json:"datasource,omitempty"`

	Targets []PanelTarget `json:"targets,omitempty"`

	GridPos PanelGridPos `json:"gridPos"`

	Options json.RawMessage `json:"options,omitempty"`

	FieldConfig PanelFieldConfig `json:"fieldConfig,omitempty"`

	Alert *PanelAlert `json:"alert,omitempty"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type DashboardStatus

type DashboardStatus struct {
	UID string `json:"uid"`

	Title string `json:"title"`

	Version int `json:"version"`

	LastUpdated time.Time `json:"last_updated"`

	Health string `json:"health"` // healthy, degraded, unhealthy

	DataFlowStatus string `json:"data_flow_status"`

	PanelCount int `json:"panel_count"`

	QueryCount int `json:"query_count"`

	ErrorCount int `json:"error_count"`

	ResponseTimes []float64 `json:"response_times"`

	Metadata json.RawMessage `json:"metadata"`
}

type DashboardTemplating

type DashboardTemplating struct {
	List []TemplateVariable `json:"list"`
}

type DashboardTimeRange

type DashboardTimeRange struct {
	From string `json:"from"`

	To string `json:"to"`
}

type DataDogConfig

type DataDogConfig struct {
	Enabled bool `yaml:"enabled"`

	APIKey string `yaml:"api_key"`

	AppKey string `yaml:"app_key"`

	Site string `yaml:"site"`

	Tags []string `yaml:"tags"`
}

type DataDogExporter

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

func (*DataDogExporter) Export

func (de *DataDogExporter) Export(ctx context.Context, batch MetricBatch) (*ExportResult, error)

func (*DataDogExporter) HealthCheck

func (de *DataDogExporter) HealthCheck(ctx context.Context) error

func (*DataDogExporter) Name

func (de *DataDogExporter) Name() string

type DataPoint

type DataPoint struct {
	Timestamp time.Time `json:"timestamp"`

	Value float64 `json:"value"`
}

type DataRetentionConfig

type DataRetentionConfig struct {
	LogRetention time.Duration `yaml:"log_retention"`

	MetricRetention time.Duration `yaml:"metric_retention"`

	AuditRetention time.Duration `yaml:"audit_retention"`

	BackupRetention time.Duration `yaml:"backup_retention"`

	ArchiveSchedule string `yaml:"archive_schedule"`

	PurgeSchedule string `yaml:"purge_schedule"`

	RetentionPolicies map[string]time.Duration `yaml:"retention_policies"`
}

type EncryptionAtRestConfig

type EncryptionAtRestConfig struct {
	Enabled bool `yaml:"enabled"`

	Algorithm string `yaml:"algorithm"`

	KeySize int `yaml:"key_size"`
}

type EncryptionConfig

type EncryptionConfig struct {
	AtRest EncryptionAtRestConfig `yaml:"at_rest"`

	InTransit EncryptionInTransitConfig `yaml:"in_transit"`

	KeyManagement KeyManagementConfig `yaml:"key_management"`
}

type EncryptionInTransitConfig

type EncryptionInTransitConfig struct {
	Enabled bool `yaml:"enabled"`

	TLSVersion string `yaml:"tls_version"`

	Protocols []string `yaml:"protocols"`
}

type Evidence

type Evidence struct {
	ID string `json:"id"`

	Type string `json:"type"` // document, log, metric, screenshot, audit

	Source string `json:"source"`

	Location string `json:"location"`

	Timestamp time.Time `json:"timestamp"`

	Collector string `json:"collector"`

	Hash string `json:"hash"`

	Signature string `json:"signature,omitempty"`

	Description string `json:"description"`

	Metadata json.RawMessage `json:"metadata"`
}

type EvidenceStore

type EvidenceStore interface {
	Store(evidence Evidence) error

	Get(id string) (*Evidence, error)

	List(requirementID string) ([]Evidence, error)

	Delete(id string) error

	Verify(id string) (bool, error)
}

type ExecutiveSummary

type ExecutiveSummary struct {
	OverallScore float64 `json:"overallScore"` // 0-100%

	PerformanceGrade string `json:"performanceGrade"` // A, B, C, D, F

	SLACompliance float64 `json:"slaCompliance"` // 0-100%

	SystemHealth string `json:"systemHealth"` // Excellent, Good, Fair, Poor, Critical

	KeyHighlights []string `json:"keyHighlights"`

	CriticalIssues []string `json:"criticalIssues"`

	TrendDirection string `json:"trendDirection"` // Improving, Stable, Degrading

	RecommendedActions []string `json:"recommendedActions"`
}

type ExportResult

type ExportResult struct {
	Exporter string `json:"exporter"`

	Success bool `json:"success"`

	MetricCount int `json:"metric_count"`

	BytesExported int64 `json:"bytes_exported"`

	Duration time.Duration `json:"duration"`

	Error string `json:"error,omitempty"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type Exporter

type Exporter interface {
	Export(ctx context.Context, batch MetricBatch) (*ExportResult, error)

	Name() string

	HealthCheck(ctx context.Context) error
}

type ExporterConfig

type ExporterConfig struct {
	Prometheus PrometheusConfig `yaml:"prometheus"`

	InfluxDB InfluxDBConfig `yaml:"influxdb"`

	DataDog DataDogConfig `yaml:"datadog"`

	NewRelic NewRelicConfig `yaml:"newrelic"`

	Custom []CustomConfig `yaml:"custom"`

	Streaming StreamingConfig `yaml:"streaming"`

	Batch BatchConfig `yaml:"batch"`

	Transform TransformConfig `yaml:"transform"`

	Compression CompressionConfig `yaml:"compression"`
}

type FieldDefaults

type FieldDefaults struct {
	Unit string `json:"unit,omitempty"`

	Min *float64 `json:"min,omitempty"`

	Max *float64 `json:"max,omitempty"`

	Decimals *int `json:"decimals,omitempty"`

	Thresholds *FieldThresholds `json:"thresholds,omitempty"`

	Mappings []FieldMapping `json:"mappings,omitempty"`

	Custom json.RawMessage `json:"custom,omitempty"`
}

type FieldMapping

type FieldMapping struct {
	Type string `json:"type"`

	Value string `json:"value"`

	Text string `json:"text"`

	Options json.RawMessage `json:"options,omitempty"`
}

type FieldMatcher

type FieldMatcher struct {
	ID string `json:"id"`

	Options string `json:"options"`
}

type FieldOverride

type FieldOverride struct {
	Matcher FieldMatcher `json:"matcher"`

	Properties []FieldProperty `json:"properties"`
}

type FieldProperty

type FieldProperty struct {
	ID string `json:"id"`

	Value interface{} `json:"value"`
}

type FieldThresholds

type FieldThresholds struct {
	Mode string `json:"mode"`

	Steps []ThresholdStep `json:"steps"`
}

type FilterConfig

type FilterConfig struct {
	Name string `yaml:"name"`

	Metrics []string `yaml:"metrics"`

	Labels map[string]string `yaml:"labels"`

	Condition string `yaml:"condition"` // include, exclude
}

type InfluxDBConfig

type InfluxDBConfig struct {
	Enabled bool `yaml:"enabled"`

	URL string `yaml:"url"`

	Database string `yaml:"database"`

	Measurement string `yaml:"measurement"`

	Precision string `yaml:"precision"`

	RetentionPolicy string `yaml:"retention_policy"`
}

type InfluxDBExporter

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

func (*InfluxDBExporter) Export

func (ie *InfluxDBExporter) Export(ctx context.Context, batch MetricBatch) (*ExportResult, error)

func (*InfluxDBExporter) HealthCheck

func (ie *InfluxDBExporter) HealthCheck(ctx context.Context) error

func (*InfluxDBExporter) Name

func (ie *InfluxDBExporter) Name() string

type IntentProcessingMetrics

type IntentProcessingMetrics struct {
	LatencyP50 float64 `json:"latencyP50"`

	LatencyP95 float64 `json:"latencyP95"`

	LatencyP99 float64 `json:"latencyP99"`

	Throughput float64 `json:"throughput"` // requests/min

	ErrorRate float64 `json:"errorRate"` // percentage

	ConcurrentUsers int `json:"concurrentUsers"`

	SuccessRate float64 `json:"successRate"` // percentage

	AverageQueueTime float64 `json:"averageQueueTime"` // seconds
}

type KeyManagementConfig

type KeyManagementConfig struct {
	Provider string `yaml:"provider"`

	KeyRotation time.Duration `yaml:"key_rotation"`

	BackupKeys bool `yaml:"backup_keys"`
}

type MappingConfig

type MappingConfig struct {
	From string `yaml:"from"`

	To string `yaml:"to"`

	Labels map[string]string `yaml:"labels"`
}

type MetricBatch

type MetricBatch struct {
	ID string `json:"id"`

	Timestamp time.Time `json:"timestamp"`

	Metrics []MetricPoint `json:"metrics"`

	Source string `json:"source"`

	Version string `json:"version"`
}

type MetricPoint

type MetricPoint struct {
	Name string `json:"name"`

	Value float64 `json:"value"`

	Timestamp time.Time `json:"timestamp"`

	Labels map[string]string `json:"labels"`

	Type string `json:"type"` // gauge, counter, histogram

	Unit string `json:"unit,omitempty"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type MetricsExporter

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

func NewMetricsExporter

func NewMetricsExporter(config ExporterConfig, promClient v1.API, logger *logrus.Logger) *MetricsExporter

func (*MetricsExporter) ExportBatch

func (me *MetricsExporter) ExportBatch(ctx context.Context, metrics []MetricPoint, targets []string) ([]*ExportResult, error)

func (*MetricsExporter) GetExporterStatus

func (me *MetricsExporter) GetExporterStatus(ctx context.Context) map[string]bool

func (*MetricsExporter) QueryAndExport

func (me *MetricsExporter) QueryAndExport(ctx context.Context, query string, exportTargets []string) error

func (*MetricsExporter) Start

func (me *MetricsExporter) Start(ctx context.Context) error

func (*MetricsExporter) Stop

func (me *MetricsExporter) Stop()

func (*MetricsExporter) StreamMetric

func (me *MetricsExporter) StreamMetric(point MetricPoint, targets []string) error

type MitigationMeasure

type MitigationMeasure struct {
	ID string `json:"id"`

	Name string `json:"name"`

	Description string `json:"description"`

	Status string `json:"status"` // planned, implemented, verified

	Effectiveness float64 `json:"effectiveness"`

	Owner string `json:"owner"`

	DueDate time.Time `json:"due_date"`
}

type MonitoringConfig

type MonitoringConfig struct {
	HealthCheckInterval time.Duration `yaml:"health_check_interval"`

	DataFlowTimeout time.Duration `yaml:"data_flow_timeout"`

	AlertsEnabled bool `yaml:"alerts_enabled"`
}

type NetworkMetrics

type NetworkMetrics struct {
	Latency float64 `json:"latency"` // ms

	Throughput float64 `json:"throughput"` // Mbps

	PacketLoss float64 `json:"packetLoss"` // percentage

	ConnectionCount int64 `json:"connectionCount"`

	ActiveConnections int64 `json:"activeConnections"`

	ConnectionErrors int64 `json:"connectionErrors"`
}

type NewRelicConfig

type NewRelicConfig struct {
	Enabled bool `yaml:"enabled"`

	LicenseKey string `yaml:"license_key"`

	AccountID string `yaml:"account_id"`

	InsightsKey string `yaml:"insights_key"`
}

type NewRelicExporter

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

func (*NewRelicExporter) Export

func (nr *NewRelicExporter) Export(ctx context.Context, batch MetricBatch) (*ExportResult, error)

func (*NewRelicExporter) HealthCheck

func (nr *NewRelicExporter) HealthCheck(ctx context.Context) error

func (*NewRelicExporter) Name

func (nr *NewRelicExporter) Name() string

type NotificationConfig

type NotificationConfig struct {
	Enabled bool `yaml:"enabled"`

	Channels []string `yaml:"channels"` // slack, email, webhook, pagerduty

	Recipients map[string][]string `yaml:"recipients"`

	Templates map[string]string `yaml:"templates"`
}

type PagerDutyEventPayload

type PagerDutyEventPayload struct {
	Summary string `json:"summary"`

	Source string `json:"source"`

	Severity string `json:"severity"`

	Timestamp time.Time `json:"timestamp"`

	Component string `json:"component,omitempty"`

	Group string `json:"group,omitempty"`

	Class string `json:"class,omitempty"`

	Details json.RawMessage `json:"custom_details,omitempty"`
}

type PagerDutyImage

type PagerDutyImage struct {
	Src string `json:"src"`

	Href string `json:"href,omitempty"`

	Alt string `json:"alt,omitempty"`
}
type PagerDutyLink struct {
	Href string `json:"href"`

	Text string `json:"text"`
}

type PagerDutyPayload

type PagerDutyPayload struct {
	RoutingKey string `json:"routing_key"`

	EventAction string `json:"event_action"`

	DedupKey string `json:"dedup_key,omitempty"`

	Payload PagerDutyEventPayload `json:"payload"`

	Links []PagerDutyLink `json:"links,omitempty"`

	Images []PagerDutyImage `json:"images,omitempty"`
}

type PanelAlert

type PanelAlert struct {
	ID int `json:"id,omitempty"`

	Name string `json:"name"`

	Message string `json:"message"`

	Frequency string `json:"frequency"`

	Conditions []AlertCondition `json:"conditions"`

	ExecutionErrorState string `json:"executionErrorState"`

	NoDataState string `json:"noDataState"`

	For string `json:"for"`
}

type PanelFieldConfig

type PanelFieldConfig struct {
	Defaults FieldDefaults `json:"defaults"`

	Overrides []FieldOverride `json:"overrides,omitempty"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type PanelGridPos

type PanelGridPos struct {
	H int `json:"h"`

	W int `json:"w"`

	X int `json:"x"`

	Y int `json:"y"`
}

type PanelTarget

type PanelTarget struct {
	Expr string `json:"expr,omitempty"`

	RefID string `json:"refId"`

	LegendFormat string `json:"legendFormat,omitempty"`

	IntervalFactor int `json:"intervalFactor,omitempty"`

	Format string `json:"format,omitempty"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type PerformanceMetrics

type PerformanceMetrics struct {
	IntentProcessing IntentProcessingMetrics `json:"intentProcessing"`

	RAGSystem RAGSystemMetrics `json:"ragSystem"`

	CacheSystem CacheSystemMetrics `json:"cacheSystem"`

	ResourceUsage ResourceUsageMetrics `json:"resourceUsage"`

	NetworkMetrics NetworkMetrics `json:"networkMetrics"`
}

type PerformanceReport

type PerformanceReport struct {
	ID string `json:"id"`

	Timestamp time.Time `json:"timestamp"`

	Period string `json:"period"`

	Environment string `json:"environment"`

	Version string `json:"version"`

	ExecutiveSummary ExecutiveSummary `json:"executiveSummary"`

	PerformanceClaims []ClaimValidation `json:"performanceClaims"`

	Metrics PerformanceMetrics `json:"metrics"`

	StatisticalAnalysis StatisticalAnalysis `json:"statisticalAnalysis"`

	RegressionAnalysis RegressionAnalysis `json:"regressionAnalysis"`

	CapacityAnalysis CapacityAnalysis `json:"capacityAnalysis"`

	BusinessImpact BusinessImpact `json:"businessImpact"`

	Recommendations []Recommendation `json:"recommendations"`

	AlertsSummary AlertsSummary `json:"alertsSummary"`
}

type PerformanceReporter

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

func NewPerformanceReporter

func NewPerformanceReporter(prometheusURL string, config *ReporterConfig) (*PerformanceReporter, error)

func (*PerformanceReporter) GenerateReport

func (pr *PerformanceReporter) GenerateReport(ctx context.Context, period string) (*PerformanceReport, error)

type PerformanceThresholds

type PerformanceThresholds struct {
	IntentProcessingLatencyP95 float64 `yaml:"intentProcessingLatencyP95"` // 2.0 seconds

	ConcurrentUserCapacity int `yaml:"concurrentUserCapacity"` // 200 users

	ThroughputTarget float64 `yaml:"throughputTarget"` // 45 intents/min

	ServiceAvailability float64 `yaml:"serviceAvailability"` // 99.95%

	RAGLatencyP95 float64 `yaml:"ragLatencyP95"` // 0.2 seconds

	CacheHitRate float64 `yaml:"cacheHitRate"` // 87%
}

type Period

type Period struct {
	StartTime time.Time `json:"start_time"`

	EndTime time.Time `json:"end_time"`

	Duration string `json:"duration"`
}

type PrometheusConfig

type PrometheusConfig struct {
	Enabled bool `yaml:"enabled"`

	URL string `yaml:"url"`

	RemoteWrite string `yaml:"remote_write"`

	Format string `yaml:"format"` // openmetrics, prometheus
}

type PrometheusExporter

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

func (*PrometheusExporter) Export

func (pe *PrometheusExporter) Export(ctx context.Context, batch MetricBatch) (*ExportResult, error)

func (*PrometheusExporter) HealthCheck

func (pe *PrometheusExporter) HealthCheck(ctx context.Context) error

func (*PrometheusExporter) Name

func (pe *PrometheusExporter) Name() string

type RAGSystemMetrics

type RAGSystemMetrics struct {
	RetrievalLatencyP50 float64 `json:"retrievalLatencyP50"`

	RetrievalLatencyP95 float64 `json:"retrievalLatencyP95"`

	ContextAccuracy float64 `json:"contextAccuracy"` // percentage

	DocumentsIndexed int64 `json:"documentsIndexed"`

	QueriesPerSecond float64 `json:"queriesPerSecond"`

	EmbeddingLatency float64 `json:"embeddingLatency"` // seconds
}

type RBACConfig

type RBACConfig struct {
	Enabled bool `yaml:"enabled"`

	Roles map[string]RoleConfig `yaml:"roles"`
}

type Recommendation

type Recommendation struct {
	ID string `json:"id,omitempty"`

	Category string `json:"category,omitempty"` // Performance, Cost, Reliability, etc.

	Type string `json:"type,omitempty"` // performance, capacity, reliability

	Priority string `json:"priority"` // Critical, High, Medium, Low

	Title string `json:"title"`

	Description string `json:"description"`

	Action string `json:"action,omitempty"`

	Impact string `json:"impact"` // Expected improvement

	Effort string `json:"effort,omitempty"` // Implementation effort

	Timeline string `json:"timeline,omitempty"` // Implementation timeline

	Dependencies []string `json:"dependencies,omitempty"`
}

type RegressionAnalysis

type RegressionAnalysis struct {
	RegressionDetected bool `json:"regressionDetected"`

	RegressionSeverity string `json:"regressionSeverity"` // Low, Medium, High, Critical

	PerformanceChange map[string]float64 `json:"performanceChange"` // metric -> percentage change

	BaselineComparison BaselineComparison `json:"baselineComparison"`

	TrendAnalysis TrendAnalysis `json:"trendAnalysis"`
}

type RemediationPlan

type RemediationPlan struct {
	ID string `json:"id"`

	Title string `json:"title"`

	Description string `json:"description"`

	Priority string `json:"priority"` // critical, high, medium, low

	Owner string `json:"owner"`

	DueDate time.Time `json:"due_date"`

	Status string `json:"status"` // planned, in_progress, completed, cancelled

	Progress float64 `json:"progress"`

	Tasks []RemediationTask `json:"tasks"`

	Cost float64 `json:"cost"`

	Risk string `json:"risk"`

	Metadata json.RawMessage `json:"metadata"`
}

type RemediationTask

type RemediationTask struct {
	ID string `json:"id"`

	Title string `json:"title"`

	Description string `json:"description"`

	Assignee string `json:"assignee"`

	DueDate time.Time `json:"due_date"`

	Status string `json:"status"`

	Effort float64 `json:"effort"`

	Dependencies []string `json:"dependencies"`

	Metadata json.RawMessage `json:"metadata"`
}

type ReportGenerator

type ReportGenerator interface {
	GeneratePDF(report SLAReport) ([]byte, error)

	GenerateHTML(report SLAReport) (string, error)

	GenerateCSV(report SLAReport) (string, error)

	GenerateJSON(report SLAReport) ([]byte, error)
}

type ReportScheduleConfig

type ReportScheduleConfig struct {
	Daily bool `yaml:"daily"`

	Weekly bool `yaml:"weekly"`

	Monthly bool `yaml:"monthly"`

	Quarterly bool `yaml:"quarterly"`

	Annual bool `yaml:"annual"`
}

type ReportSummary

type ReportSummary struct {
	TotalViolations int `json:"total_violations"`

	CriticalViolations int `json:"critical_violations"`

	AverageAvailability float64 `json:"average_availability"`

	AverageLatency float64 `json:"average_latency"`

	AverageThroughput float64 `json:"average_throughput"`

	MTTR float64 `json:"mttr"` // Mean Time to Resolution in minutes

	MTBF float64 `json:"mtbf"` // Mean Time Between Failures in hours
}

type ReportTrends

type ReportTrends struct {
	AvailabilityTrend string `json:"availability_trend"` // improving, stable, degrading

	LatencyTrend string `json:"latency_trend"`

	ThroughputTrend string `json:"throughput_trend"`

	ViolationTrend string `json:"violation_trend"`

	TrendConfidence float64 `json:"trend_confidence"`
}

type ReporterConfig

type ReporterConfig struct {
	ReportInterval time.Duration `yaml:"reportInterval"`

	MetricsRetention time.Duration `yaml:"metricsRetention"`

	OutputFormats []string `yaml:"outputFormats"` // html, json, pdf, slack

	Thresholds PerformanceThresholds `yaml:"thresholds"`

	Notifications NotificationConfig `yaml:"notifications"`

	Storage StorageConfig `yaml:"storage"`
}

type ResourceBottleneck

type ResourceBottleneck struct {
	Resource string `json:"resource"` // CPU, Memory, Network, Disk

	Utilization float64 `json:"utilization"` // percentage

	Impact string `json:"impact"` // High, Medium, Low

	Mitigation string `json:"mitigation"` // Recommended action
}

type ResourceUsageMetrics

type ResourceUsageMetrics struct {
	CPUUtilization float64 `json:"cpuUtilization"` // percentage

	MemoryUtilization float64 `json:"memoryUtilization"` // percentage

	DiskUtilization float64 `json:"diskUtilization"` // percentage

	NetworkBandwidth float64 `json:"networkBandwidth"` // Mbps

	FileDescriptors int64 `json:"fileDescriptors"`

	GoroutineCount int64 `json:"goroutineCount"`

	HeapSize int64 `json:"heapSize"` // bytes
}

type RiskAssessment

type RiskAssessment struct {
	OverallRisk string `json:"overall_risk"` // low, medium, high, critical

	RiskFactors []RiskFactor `json:"risk_factors"`

	Mitigation []MitigationMeasure `json:"mitigation"`

	ResidualRisk string `json:"residual_risk"`

	LastAssessment time.Time `json:"last_assessment"`

	NextAssessment time.Time `json:"next_assessment"`
}

type RiskFactor

type RiskFactor struct {
	ID string `json:"id"`

	Name string `json:"name"`

	Description string `json:"description"`

	Likelihood string `json:"likelihood"` // low, medium, high

	Impact string `json:"impact"` // low, medium, high

	RiskScore float64 `json:"risk_score"`

	Category string `json:"category"`
}

type RoleConfig

type RoleConfig struct {
	Dashboards []string `yaml:"dashboards"`

	Edit bool `yaml:"edit"`

	Admin bool `yaml:"admin"`
}

type SLAReport

type SLAReport struct {
	ID string `json:"id"`

	GeneratedAt time.Time `json:"generated_at"`

	ReportType string `json:"report_type"` // daily, weekly, monthly, ad_hoc

	Period Period `json:"period"`

	OverallSLAScore float64 `json:"overall_sla_score"`

	SLAStatuses []SLAStatus `json:"sla_statuses"`

	Summary ReportSummary `json:"summary"`

	Trends ReportTrends `json:"trends"`

	Recommendations []Recommendation `json:"recommendations"`

	BusinessMetrics BusinessMetrics `json:"business_metrics"`

	Metadata json.RawMessage `json:"metadata"`
}

type SLAReporter

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

func NewSLAReporter

func NewSLAReporter(promClient v1.API, logger *logrus.Logger) *SLAReporter

func (*SLAReporter) GenerateReport

func (s *SLAReporter) GenerateReport(reportType string, period Period) (*SLAReport, error)

func (*SLAReporter) GetCurrentStatus

func (s *SLAReporter) GetCurrentStatus() []SLAStatus

func (*SLAReporter) GetSLAStatus

func (s *SLAReporter) GetSLAStatus(targetName string) (*SLAStatus, error)

func (*SLAReporter) ServeHTTP

func (s *SLAReporter) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*SLAReporter) Start

func (s *SLAReporter) Start(ctx context.Context) error

func (*SLAReporter) Stop

func (s *SLAReporter) Stop()

type SLAStatus

type SLAStatus struct {
	Target SLATarget `json:"target"`

	CurrentValue float64 `json:"current_value"`

	ComplianceStatus string `json:"compliance_status"` // compliant, at_risk, violation

	ErrorBudgetUsed float64 `json:"error_budget_used"`

	BurnRate float64 `json:"burn_rate"`

	TimeToExhaustion *time.Time `json:"time_to_exhaustion,omitempty"`

	LastUpdated time.Time `json:"last_updated"`

	History []DataPoint `json:"history"`

	Violations []SLAViolation `json:"violations"`
}

type SLATarget

type SLATarget struct {
	Name string `json:"name"`

	Type string `json:"type"` // availability, latency, throughput

	Target float64 `json:"target"`

	Unit string `json:"unit"`

	Query string `json:"query"`

	Window time.Duration `json:"window"`

	ErrorBudget float64 `json:"error_budget"`
}

type SLAViolation

type SLAViolation struct {
	ID string `json:"id"`

	Target string `json:"target"`

	StartTime time.Time `json:"start_time"`

	EndTime *time.Time `json:"end_time,omitempty"`

	Duration time.Duration `json:"duration"`

	Severity string `json:"severity"`

	ImpactValue float64 `json:"impact_value"`

	RootCause string `json:"root_cause"`

	Resolution string `json:"resolution"`

	BusinessImpact BusinessImpact `json:"business_impact"`

	Metadata json.RawMessage `json:"metadata"`
}

type ScalingRecommendation

type ScalingRecommendation struct {
	Component string `json:"component"`

	Action string `json:"action"` // Scale Up, Scale Down, Optimize

	Priority string `json:"priority"` // High, Medium, Low

	Timeline string `json:"timeline"` // Immediate, Short-term, Long-term

	EstimatedCost float64 `json:"estimatedCost"`

	ExpectedBenefit string `json:"expectedBenefit"`
}

type SlackAction

type SlackAction struct {
	Type string `json:"type"`

	Text string `json:"text"`

	URL string `json:"url,omitempty"`

	Style string `json:"style,omitempty"`
}

type SlackAttachment

type SlackAttachment struct {
	Color string `json:"color,omitempty"`

	Title string `json:"title,omitempty"`

	Text string `json:"text,omitempty"`

	Fields []SlackField `json:"fields,omitempty"`

	Actions []SlackAction `json:"actions,omitempty"`

	Timestamp int64 `json:"ts,omitempty"`

	Footer string `json:"footer,omitempty"`

	FooterIcon string `json:"footer_icon,omitempty"`
}

type SlackField

type SlackField struct {
	Title string `json:"title"`

	Value string `json:"value"`

	Short bool `json:"short"`
}

type SlackPayload

type SlackPayload struct {
	Channel string `json:"channel,omitempty"`

	Username string `json:"username,omitempty"`

	IconEmoji string `json:"icon_emoji,omitempty"`

	Text string `json:"text"`

	Attachments []SlackAttachment `json:"attachments,omitempty"`
}

type StatisticalAnalysis

type StatisticalAnalysis struct {
	ConfidenceLevel float64 `json:"confidenceLevel"` // percentage

	SampleSize int64 `json:"sampleSize"`

	PValue float64 `json:"pValue"`

	EffectSize float64 `json:"effectSize"`

	StatisticalPower float64 `json:"statisticalPower"` // percentage

	NormalityTest bool `json:"normalityTest"` // passed

	ConfidenceIntervals map[string]ConfidenceInterval `json:"confidenceIntervals"`
}

type StorageConfig

type StorageConfig struct {
	LocalPath string `yaml:"localPath"`

	S3Bucket string `yaml:"s3Bucket"`

	GCSBucket string `yaml:"gcsBucket"`

	RetentionDays int `yaml:"retentionDays"`
}

type StreamMetric

type StreamMetric struct {
	Point MetricPoint `json:"point"`

	Targets []string `json:"targets"`

	Priority int `json:"priority"`
}

type StreamingConfig

type StreamingConfig struct {
	Enabled bool `yaml:"enabled"`

	BatchSize int `yaml:"batch_size"`

	FlushInterval time.Duration `yaml:"flush_interval"`

	BufferSize int `yaml:"buffer_size"`

	Workers int `yaml:"workers"`
}

type TeamsAction

type TeamsAction struct {
	Type string `json:"@type"`

	Name string `json:"name"`

	Targets []map[string]string `json:"targets,omitempty"`
}

type TeamsFact

type TeamsFact struct {
	Name string `json:"name"`

	Value string `json:"value"`
}

type TeamsPayload

type TeamsPayload struct {
	Type string `json:"@type"`

	Context string `json:"@context"`

	ThemeColor string `json:"themeColor,omitempty"`

	Summary string `json:"summary"`

	Sections []TeamsSection `json:"sections,omitempty"`

	Actions []TeamsAction `json:"potentialAction,omitempty"`
}

type TeamsSection

type TeamsSection struct {
	ActivityTitle string `json:"activityTitle,omitempty"`

	ActivitySubtitle string `json:"activitySubtitle,omitempty"`

	ActivityText string `json:"activityText,omitempty"`

	ActivityImage string `json:"activityImage,omitempty"`

	Facts []TeamsFact `json:"facts,omitempty"`

	Markdown bool `json:"markdown,omitempty"`
}

type TemplateConfig

type TemplateConfig struct {
	Path string `yaml:"path"`

	Variables map[string]string `yaml:"variables"`
}

type TemplateOption

type TemplateOption struct {
	Text string `json:"text"`

	Value string `json:"value"`

	Selected bool `json:"selected"`
}

type TemplateVariable

type TemplateVariable struct {
	Name string `json:"name"`

	Type string `json:"type"`

	DataSource string `json:"datasource,omitempty"`

	Query string `json:"query,omitempty"`

	Options []TemplateOption `json:"options,omitempty"`

	Current TemplateOption `json:"current"`

	Hide int `json:"hide,omitempty"`

	Refresh int `json:"refresh,omitempty"`

	Multi bool `json:"multi,omitempty"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type TestResult

type TestResult struct {
	ID string `json:"id"`

	Timestamp time.Time `json:"timestamp"`

	Tester string `json:"tester"`

	Method string `json:"method"` // manual, automated, hybrid

	Result string `json:"result"` // pass, fail, partial

	Score float64 `json:"score"`

	Notes string `json:"notes"`

	Evidence []string `json:"evidence"`

	Metadata json.RawMessage `json:"metadata"`
}

type ThresholdStep

type ThresholdStep struct {
	Color string `json:"color"`

	Value *float64 `json:"value"`
}

type TransformConfig

type TransformConfig struct {
	Aggregations []AggregationConfig `yaml:"aggregations"`

	Filters []FilterConfig `yaml:"filters"`

	Mappings []MappingConfig `yaml:"mappings"`
}

type TrendAnalysis

type TrendAnalysis struct {
	ShortTerm TrendData `json:"shortTerm"` // 1 hour

	MediumTerm TrendData `json:"mediumTerm"` // 24 hours

	LongTerm TrendData `json:"longTerm"` // 7 days
}

type TrendData

type TrendData struct {
	Period string `json:"period"`

	Direction string `json:"direction"` // Improving, Stable, Degrading

	ChangeRate float64 `json:"changeRate"` // percentage change

	Significance string `json:"significance"` // High, Medium, Low

	Prediction string `json:"prediction"` // Future trend prediction
}

type ViolationStore

type ViolationStore interface {
	Store(violation SLAViolation) error

	Get(id string) (*SLAViolation, error)

	List(target string, since time.Time) ([]SLAViolation, error)

	Update(violation SLAViolation) error
}

type WebhookConfig

type WebhookConfig struct {
	Name string `yaml:"name"`

	URL string `yaml:"url"`

	Method string `yaml:"method"`

	Headers map[string]string `yaml:"headers"`

	Format string `yaml:"format"` // json, slack, teams, custom

	Enabled bool `yaml:"enabled"`

	Retries int `yaml:"retries"`

	Timeout time.Duration `yaml:"timeout"`

	Templates map[string]string `yaml:"templates"`
}

type WebhookEvent

type WebhookEvent struct {
	Type string

	Report *PerformanceReport

	Alert *AlertInfo

	Regression *RegressionAnalysis

	CustomData map[string]interface{}
}

type WebhookManager

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

func NewWebhookManager

func NewWebhookManager(logger *zap.Logger, webhooks map[string]WebhookConfig) *WebhookManager

func (*WebhookManager) SendAlert

func (wm *WebhookManager) SendAlert(ctx context.Context, alert *AlertInfo) error

func (*WebhookManager) SendPerformanceReport

func (wm *WebhookManager) SendPerformanceReport(ctx context.Context, report *PerformanceReport) error

func (*WebhookManager) SendRegressionAlert

func (wm *WebhookManager) SendRegressionAlert(ctx context.Context, regression *RegressionAnalysis) error

type WebhookPayload

type WebhookPayload struct {
	EventType string `json:"event_type"`

	Timestamp time.Time `json:"timestamp"`

	Source string `json:"source"`

	Environment string `json:"environment"`

	Severity string `json:"severity"`

	Report *PerformanceReport `json:"report,omitempty"`

	Summary *ExecutiveSummary `json:"summary,omitempty"`

	Claims []ClaimValidation `json:"claims,omitempty"`

	Alerts []AlertInfo `json:"alerts,omitempty"`

	CustomData json.RawMessage `json:"custom_data,omitempty"`
}

Jump to

Keyboard shortcuts

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