Observability

by blueswen

skill

Analyzes distributed systems using Prometheus (PromQL), Loki (LogQL), and Tempo (TraceQL). Constructs efficient queries for metrics, logs, and traces. Interprets results with token-efficient structured output. Use when debugging performance issues, investigating errors, analyzing latency, or correlating observability signals across metrics, logs, and traces.

Skill Details

Repository Files

7 files in this skill directory


name: observability description: Analyzes distributed systems using Prometheus (PromQL), Loki (LogQL), and Tempo (TraceQL). Constructs efficient queries for metrics, logs, and traces. Interprets results with token-efficient structured output. Use when debugging performance issues, investigating errors, analyzing latency, or correlating observability signals across metrics, logs, and traces.

Observability Analysis

Query construction and analysis for Prometheus, Loki, and Tempo.

Core Principles

Start with all available metrics then drill down to logs and traces for context.

Progressive Query Construction

  • Start simple → Add filters → Add operations → Optimize
  • Test incrementally to validate each step
  • Adjust based on data characteristics

Multi-Signal Correlation

  • Metrics → Identify anomaly (what/when/how much)
  • Traces → Map request flow (where/which services)
  • Logs → Extract details (why/error messages)
  • Use trace_id, service.name, timestamp for correlation

Token-Efficient Results

## Finding: [One-sentence summary]

**Evidence**: [Specific values/metrics]
**Impact**: [User/business effect]
**Cause**: [Root issue if identified]
**Action**: [Next step]

Target: <500 tokens for complete analysis

Query Patterns

Common starting points (adapt based on context):

# Metrics: Error rate, latency percentiles, traffic patterns
sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m]))
histogram_quantile(0.95, sum by (le) (rate(http_duration_bucket[5m])))
sum(rate(http_requests_total[5m])) by (endpoint)
# Logs: Error details, slow operations
{job="service"} |= "error" | json
{job="service"} | json | unwrap duration_ms | duration_ms > threshold
# Traces: Error traces, slow requests, request flow
{status=error && service.name="service"}
{duration > threshold && service.name="service"}
{kind="server" && service.name="service"}

Query Construction Guidelines

Labels: Use specific labels, avoid high cardinality aggregations Time ranges: Match analysis needs (5m for rate, adjust as needed) Aggregations: Filter first, then aggregate for efficiency

Result Interpretation

Extract key information:

  • Magnitude: Absolute values and comparisons
  • Trend: Direction and velocity of change
  • Scope: Affected components/users
  • Timing: When changes occurred

Quantify impact: Convert metrics to business/user impact Prioritize: Focus on severity, scope, and trend

Reference Documentation

Consult references for detailed syntax, patterns, and workflows:

  • references/promql.md - PromQL functions, RED/USE methods, optimization patterns
  • references/logql.md - LogQL parsers, aggregations, pipeline optimization
  • references/traceql.md - TraceQL span filtering, structural queries, performance analysis
  • references/semantic-conventions.md - OpenTelemetry attribute standards and naming
  • references/analysis-patterns.md - Token-efficient templates, output formats, examples
  • references/troubleshooting.md - Investigation workflows, scenario-specific patterns

When to use references:

  • Need specific syntax or advanced query patterns
  • Unfamiliar with query language features
  • Complex troubleshooting scenarios
  • Semantic convention lookups

Behavior

DO:

  • Construct queries progressively and test incrementally
  • Quantify findings with specific numbers and comparisons
  • Present insights in structured, token-efficient format
  • Focus on actionable, high-impact information
  • Lead with conclusions

DON'T:

  • Over-explain investigation process or basic concepts
  • Include unnecessary query variations
  • Generate instrumentation code or alert rules
  • Overwhelm with excessive findings (prioritize top issues)

Success Criteria

Effective analysis provides:

  • Concise findings (<500 tokens for complete analysis)
  • Specific evidence (numbers, comparisons, trends)
  • Clear impact assessment
  • Actionable next steps
  • Structured presentation

Related Skills

Attack Tree Construction

Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.

skill

Grafana Dashboards

Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.

skill

Matplotlib

Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.

skill

Scientific Visualization

Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.

skill

Seaborn

Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.

skill

Shap

Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Query Writing

For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations

skill

Pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

skill

Scientific Visualization

Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.

skill

Skill Information

Category:Skill
Last Updated:11/19/2025