Documentation
¶
Index ¶
Constants ¶
View Source
const ( OneMinutePeriodInSeconds int32 = 60 FiveMinutePeriodInSeconds int32 = 60 * 5 // 60 seconds * 5 minutes OneHourPeriodInSeconds int32 = 60 * 60 // 60 seconds * 60 minutes OneDayPeriodInSeconds int32 = 60 * 60 * 24 // 60 seconds * 60 minutes * 24 hours )
CloudWatch query periods (in seconds) selected per metrics granularity.
Variables ¶
This section is empty.
Functions ¶
func GetTimeWindowForGranularity ¶ added in v0.8.6
func GetTimeWindowForGranularity(endTime time.Time, granularity string) (types.CloudWatchTimeWindow, error)
GetTimeWindowForGranularity returns the CloudWatch query window ending at endTime for the requested metrics granularity. The window length is bounded by CloudWatch's per-period data retention: 60s→15 days, 5m→63 days, and both 1h and 1d→365 days. The returned window's Period matches the granularity.
Types ¶
type MetricService ¶
type MetricService struct {
// contains filtered or unexported fields
}
func NewMetricService ¶
func NewMetricService(client *cloudwatch.Client) *MetricService
func (*MetricService) ProcessProvisionedCluster ¶ added in v0.4.0
func (ms *MetricService) ProcessProvisionedCluster(ctx context.Context, cluster kafkatypes.Cluster, followerFetching bool, timeWindow types.CloudWatchTimeWindow) (*types.ClusterMetrics, error)
ProcessProvisionedCluster processes metrics for provisioned aggregated across all brokers in a cluster
func (*MetricService) ProcessServerlessCluster ¶ added in v0.4.0
func (ms *MetricService) ProcessServerlessCluster(ctx context.Context, cluster kafkatypes.Cluster, timeWindow types.CloudWatchTimeWindow) (*types.ClusterMetrics, error)
ProcessServerlessCluster processes metrics for serverless aggregated across all topics in a cluster
Click to show internal directories.
Click to hide internal directories.