Honeycomb Query Patterns logo

Honeycomb Query Patterns

Organization
aws
honeycomb-query-patterns

Load before building or reading a Honeycomb run_query on a trace, log or event dataset. Covers which operation to pick (percentiles and HEATMAP over AVG), relational fields (root., parent., any., none.), calculated fields, query math, and how to read results such as P99/P50 ratios, heatmap bands and TOTAL/OTHER rows. For datasets with dataset_type=metrics, use honeycomb-metrics-queries instead.

Overview

Publisheraws
Repositorytools-for-devops-agent
Skill namehoneycomb-query-patterns
Stars
120
Forks
97
Bundled files
7
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by aws on GitHub. Read the source before you install it.

Installation

Install the Honeycomb Query Patterns AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aws/tools-for-devops-agent/tree/main/skills/honeycomb-query-patterns
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aws/tools-for-devops-agent.git /tmp/tools-for-devops-agent
mkdir -p .claude/skills
cp -r /tmp/tools-for-devops-agent/skills/honeycomb-query-patterns .claude/skills/honeycomb-query-patterns
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Honeycomb Query Patterns in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Honeycomb Query Patterns on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Honeycomb Query Patterns is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Honeycomb Query Patterns

Requires the Honeycomb connector in the Agent Space, with its read tools enabled.

Opinionated guidance for writing effective Honeycomb queries. The MCP tools already document their parameters and schemas — this skill focuses on when and why to use each pattern, not how to call the tools.

Key Principles

  1. Never use AVG for latency — AVG hides tail latency. Use P99 (or P95/P90) to see what slow users experience. Reserve AVG for non-latency metrics like payload size.
  2. Use HEATMAP for distributions — Single-number aggregates hide bimodal patterns. HEATMAP reveals whether you have one population or two.
  3. Combine calculations in one query — COUNT, P99(duration_ms), HEATMAP(duration_ms) in a single query reduces API calls and gives a complete picture.
  4. Start broad, narrow with WHERE — Begin with a COUNT/GROUP BY to understand shape, then add filters to focus.
  5. Check for prior work — Call find_queries before writing new queries. Someone may have already answered the question.

Choosing the Right Operation

QuestionUse
How much traffic?COUNT grouped by route or service
How many unique users/IPs?COUNT_DISTINCT(field)
How fast for most users?P50(duration_ms)
How fast for the worst-off users?P99(duration_ms)
Is there a bimodal pattern?HEATMAP(duration_ms)
What's the worst case?MAX(duration_ms)
How many concurrent operations?CONCURRENCY
Is it getting worse over time?RATE_AVG(duration_ms)

Relational Field Strategy

Use relational prefixes to ask cross-span questions within a trace:

  • "Show me slow endpoints caused by a specific downstream": Filter with any.service.name to find traces where that service participates, group by root.http.route to see which user-facing endpoints are affected.
  • "What's different about errored traces?": Filter with any.error = true, group by root.name to see which entry points have errors somewhere in their trace tree.
  • Exclude noise: none.service.name = "health-check" removes traces containing health checks.

Calculated Fields

Calculated fields are per-event expressions evaluated at query time. They transform, classify, and combine existing fields without re-instrumenting code.

Three scopes — choose the narrowest that fits the need:

  • Query-scoped (not saved): exploratory, one-off analysis
  • Dataset-level (saved): reusable within one service's dataset
  • Environment-level (saved): reusable across all datasets (e.g., error_pct)

Common patterns:

  • Error rate: MUL(IF($error, 1, 0), 100) → use AVG(error_pct) to get percentage
  • Status classification: IF(GTE($http.status_code, 500), "5xx", GTE($http.status_code, 400), "4xx", "ok")
  • Latency bucketing: BUCKET($duration_ms, 500, 0, 3000)
  • Prefix routing: IF(STARTS_WITH($url, "/admin"), "admin", STARTS_WITH($url, "/api"), "api", "other")
  • Exact-match classification: use SWITCH instead of IF(EQUALS(...)) chains — same expression, more efficient

Key guardrails:

  • Don't create presentational (alias-only) fields — a field that just renames another field adds no analytical value and clutters the schema. Only save a calculated field when it does real computation (classification, extraction, math).
  • Avoid regex on large/complex fields — running REG_MATCH, REG_VALUE, or REG_COUNT on exception.stacktrace, db.statement, or full log lines can be very slow. Check whether a more targeted OTel field exists first (exception.type, exception.message, db.operation). If you must regex a long field, guard it with a CONTAINS check first.
  • EQUALS has strict type matching — EQUALS($http.status_code, 200) silently returns false if the field is stored as a string. Use find_columns to verify the field type before comparing.
  • FORMAT_TIME is expensive — avoid in high-volume queries.
  • Save query-scoped, not dataset-level, for one-off work — saved fields show up in everyone's schema.

For full syntax, operator reference, and extended anti-pattern examples, consult references/calculated-fields.md.

Before Every Query

  • Filter on is_root when measuring user-facing latency — without it, internal spans inflate the numbers
  • Use human-readable time ranges ("24h", "-6h") — epoch timestamps are error-prone and hard to review
  • Validate columns with find_columns before querying — confirms field names exist and prevents empty results

Interpreting Results

After running a query, the MCP tool returns formatted markdown plus metadata. The most important metadata field is query_result_json — a signed URL to the raw JSON result. For precise analysis, download it and parse with jq or python rather than relying solely on the ASCII rendering.

Key interpretation rules:

  • P99/P50 > 10x — bimodal distribution likely; run HEATMAP to confirm
  • TOTAL row in breakdown results = aggregate across all groups
  • OTHER row = groups beyond the query limit (increase limit if OTHER is large)
  • ASCII heatmap ▁▂▃▄▅▆▇█ = density from low to high; two bands = two populations
  • query_run_pk in metadata — feed directly to run_bubbleup for outlier analysis

Additional Resources

Reference Files

  • references/visualize-operations.md — Complete VISUALIZE operation reference with examples
  • references/relational-fields.md — Detailed relational field guide with cross-service patterns
  • references/query-examples.md — Extensive query cookbook organized by use case
  • references/result-interpretation.md — Guide to interpreting query results, raw JSON access, and statistical heuristics
  • references/calculated-fields.md — Calculated field syntax, full operator reference, common patterns, and anti-patterns (presentational fields, expensive string ops, type mismatches)

Cross-References

  • For the structured investigation workflow that uses these query patterns: honeycomb-production-investigation skill
  • For SLO interpretation and burn alert design: honeycomb-slos-and-triggers skill

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Honeycomb Query Patterns AI skill do?

Load before building or reading a Honeycomb run_query on a trace, log or event dataset. Covers which operation to pick (percentiles and HEATMAP over AVG), relational fields (root., parent., any., none.), calculated fields, query math, and how to read results such as P99/P50 ratios, heatmap bands and TOTAL/OTHER rows. For datasets with dataset_type=metrics, use honeycomb-metrics-queries instead.

Why use Honeycomb Query Patterns on TypingMind?

Because you install it once and use it with any model. Honeycomb Query Patterns is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Honeycomb Query Patterns in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aws/tools-for-devops-agent/tree/main/skills/honeycomb-query-patterns. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Honeycomb Query Patterns?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Honeycomb Query Patterns?

As many as you like. As long as a model supports skills, you can use Honeycomb Query Patterns with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Honeycomb Query Patterns AI skill free?

Yes. It is published on GitHub by aws under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇