Home / Market / observability designer

observability designer

Design production-ready observability strategies combining metrics, logs, and traces. Includes SLI/SLO design, golden-signals monitoring, alert optimization. Use when adding observability to a new service, refactoring alerting that is too noisy, or designing an SLO program before scaling production load.

skill★ 30911717 dlskills.shMITInstall in CosmosUpstream Source

Documentation & Preview

Observability Designer

A comprehensive toolkit for designing production-ready observability strategies including SLI/SLO frameworks, alert optimization, and dashboard generation.

Overview

The Observability Designer skill provides three powerful Python scripts that help you create, optimize, and maintain observability systems:

Quick Start

Prerequisites

Basic Usage

# Generate SLO framework for a service
python3 scripts/slo_designer.py --service-type api --criticality critical --user-facing true --service-name payment-service

# Optimize existing alerts
python3 scripts/alert_optimizer.py --input assets/sample_alerts.json --analyze-only

# Generate a dashboard specification
python3 scripts/dashboard_generator.py --service-type web --name "Customer Portal" --role sre

Scripts Documentation

SLO Designer (slo_designer.py)

Generates comprehensive SLO frameworks based on service characteristics.

Features

Usage Examples

# From service definition file
python3 scripts/slo_designer.py --input assets/sample_service_api.json --output slo_framework.json

# From command line parameters
python3 scripts/slo_designer.py \
    --service-type api \
    --criticality critical \
    --user-facing true \
    --service-name payment-service \
    --output payment_slos.json

# Generate and display summary only
python3 scripts/slo_designer.py --input assets/sample_service_web.json --summary-only

Service Definition Format

{
  "name": "payment-service",
  "type": "api",
  "criticality": "critical",
  "user_facing": true,
  "description": "Handles payment processing",
  "team": "payments",
  "environment": "production",
  "dependencies": [
    {
      "name": "user-service",
      "type": "api",
      "criticality": "high"
    }
  ]
}

Supported Service Types

Criticality Levels

Alert Optimizer (alert_optimizer.py)

Analyzes existing alert configurations and provides optimization recommendations.

Features

Usage Examples

# Analyze existing alerts
python3 scripts/alert_optimizer.py --input assets/sample_alerts.json --analyze-only

# Generate optimized configuration
python3 scripts/alert_optimizer.py \
    --input assets/sample_alerts.json \
    --output optimized_alerts.json

# Generate HTML report
python3 scripts/alert_optimizer.py \
    --input assets/sample_alerts.json \
    --report alert_analysis.html \
    --format html

Alert Configuration Format

{
  "alerts": [
    {
      "alert": "HighLatency",
      "expr": "histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m])) > 0.5",
      "for": "5m",
      "labels": {
        "severity": "warning",
        "service": "payment-service"
      },
      "annotations": {
        "summary": "High request latency detected",
        "runbook_url": "https://runbooks.company.com/high-latency"
      },
      "historical_data": {
        "fires_per_day": 2.5,
        "false_positive_rate": 0.15
      }
    }
  ],
  "services": [
    {
      "name": "payment-service",
      "criticality": "critical"
    }
  ]
}

Analysis Categories

Dashboard Generator (dashboard_generator.py)

Creates comprehensive dashboard specifications with role-based optimization.

Features

Usage Examples

# From service definition
python3 scripts/dashboard_generator.py \
    --input assets/sample_service_web.json \
    --output dashboard.json

# With specific role optimization
python3 scripts/dashboard_generator.py \
    --service-type api \
    --name "Payment Service" \
    --role developer \
    --output payment_dev_dashboard.json

# Generate Grafana-compatible JSON
python3 scripts/dashboard_generator.py \
    --input assets/sample_service_api.json \
    --output dashboard.json \
    --format grafana

# With documentation
python3 scripts/dashboard_generator.py \
    --service-type web \
    --name "Customer Portal" \
    --output portal_dashboard.json \
    --doc-output portal_docs.md

Target Roles

Panel Types

Sample Data

The assets/ directory contains sample configurations for testing:

The expected_outputs/ directory shows example outputs from each script:

Best Practices

SLO Design

Alert Optimization

Dashboard Design

Integration Patterns

CI/CD Integration

# Generate SLOs during service onboarding
python3 scripts/slo_designer.py --input service-config.json --output slos.json

# Validate alert configurations in pipeline
python3 scripts/alert_optimizer.py --input alerts.json --analyze-only --report validation.html

# Auto-generate dashboards for new services
python3 scripts/dashboard_generator.py --input service-config.json --format grafana --output dashboard.json

Monitoring Stack Integration

GitOps Workflow

  1. Store service definitions in version control
  2. Generate observability configurations in CI/CD
  3. Deploy configurations via GitOps
  4. Monitor effectiveness and iterate

Advanced Usage

Custom SLO Targets

Override default targets by including them in service definitions:

{
  "name": "special-service",
  "type": "api",
  "criticality": "high",
  "custom_slos": {
    "availability_target": 0.9995,
    "latency_p95_target_ms": 150,
    "error_rate_target": 0.002
  }
}

Alert Rule Templates

Use template variables for reusable alert rules:

# Generated Prometheus alert rule
- alert: {{ service_name }}_HighLatency
  expr: histogram_quantile(0.95, rate(http_request_duration_seconds_bucket{service="{{ service_name }}"}[5m])) > {{ latency_threshold }}
  for: 5m
  labels:
    severity: warning
    service: "{{ service_name }}"

Dashboard Variants

Generate multiple dashboard variants for different use cases:

# SRE operational dashboard
python3 scripts/dashboard_generator.py --input service.json --role sre --output sre-dashboard.json

# Developer debugging dashboard  
python3 scripts/dashboard_generator.py --input service.json --role developer --output dev-dashboard.json

# Executive business dashboard
python3 scripts/dashboard_generator.py --input service.json --role executive --output exec-dashboard.json

Troubleshooting

Common Issues

Script Execution Errors

Invalid Service Definitions

Missing Historical Data

Debug Mode

Enable verbose logging by setting environment variable:

export DEBUG=1
python3 scripts/slo_designer.py --input service.json

Contributing

Development Setup

# Clone the repository
git clone <repository-url>
cd engineering/observability-designer

# Run tests
python3 -m pytest tests/

# Lint code
python3 -m flake8 scripts/

Adding New Features

  1. Follow existing code patterns and error handling
  2. Include comprehensive docstrings and type hints
  3. Add test cases for new functionality
  4. Update documentation and examples

Support

For questions, issues, or feature requests:

---

*This skill is part of the Claude Skills marketplace. For more information about observability best practices, see the reference documentation in the references/ directory.*