Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Workqueue Dashboard Module

This module creates a Cloud Monitoring dashboard for a workqueue implementation, providing visibility into queue metrics, processing latency, and system health.

Usage

module "workqueue-dashboard" {
  source  = "driftlessaf/reconcilers/infra//modules/dashboard/workqueue"
  version = "~> 1.0"

  name            = var.name
  max_retry       = var.max-retry
  concurrent_work = var.concurrent-work
  scope           = var.scope

  labels = {
    team = "platform"
  }

  alerts = {
    "deadletter-alert" = google_monitoring_alert_policy.deadletter.id
  }
}

Features

The dashboard includes:

  • Queue State: Work in progress, queued items, and items added
  • Processing Metrics: Processing latency, wait times, and deduplication rates
  • Retry Analytics: Attempts at completion, maximum attempts, and time to completion
  • Dead Letter Queue: Monitoring for items that exceeded retry limits (when max_retry > 0)
  • Service Logs: Separate log views for receiver and dispatcher services
  • Alert Integration: Display configured alerts on the dashboard

Dashboard Filters

The dashboard automatically configures filters for:

  • Receiver service (${name}-rcv)
  • Dispatcher service (${name}-dsp)
  • Both Cloud Run built-in metrics and Prometheus custom metrics

Requirements

No requirements.

Providers

No providers.

Modules

Name Source Version
alerts ../sections/alerts n/a
dashboard ../ n/a
dispatcher-logs ../sections/logs n/a
layout ../sections/layout n/a
receiver-logs ../sections/logs n/a
width ../sections/width n/a
workqueue-state ../sections/workqueue n/a

Resources

No resources.

Inputs

Name Description Type Default Required
alerts A mapping from alerting policy names to the alert ids to add to the dashboard map(string) {} no
concurrent_work The amount of concurrent work to dispatch at a given time number n/a yes
labels Additional labels to apply to the dashboard map(string) {} no
max_retry The maximum number of retry attempts before a task is moved to the dead letter queue number 100 no
name Name of the workqueue string n/a yes
shards Number of workqueue shards. When > 1, dashboard shows per-shard metrics. number 1 no

Outputs

Name Description
dashboard_json The JSON representation of the dashboard