Index of every page on this site: llms.txt
All skills
Run it yourself

Set up observability for Groq integrations: latency histograms, token throughput, rate limit gauges, cost tracking, and Prometheus alerts. Use when instrumenting Groq API calls, building a metrics dashboard, or wiring latency/cost/rate-limit alerts. Trigger with phrases like "groq monitoring", "groq metrics", "groq observability", "monitor groq", "groq alerts", "groq dashboard".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/groq-observability

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈629 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Groq Observability — Worked Examples

These examples compose the helpers defined in implementation.md into end-to-end flows. The parent SKILL.md summarizes the workflow; use this file to see the pieces wired together.

Example 1: Instrument a completion and log the result

Wrap a normal chat call with trackedCompletion, then emit a structured log line. Metrics flow to Prometheus via emitMetrics automatically inside the wrapper.

const { result, metrics } = await trackedCompletion(
  "llama-3.3-70b-versatile",
  [{ role: "user", content: "Summarize this incident report in two sentences." }],
  { maxTokens: 256 }
);

// Emit a structured JSON log line for aggregation
logGroqRequest(metrics, result.id);

// metrics -> {
//   model: "llama-3.3-70b-versatile",
//   latencyMs: 180, ttftMs: 40, tokensPerSec: 310,
//   promptTokens: 620, completionTokens: 48, totalTokens: 668,
//   queueTimeMs: 8, estimatedCostUsd: 0.000404
// }

The emitted groq_latency_ms, groq_tokens_total, groq_tokens_per_second, and groq_cost_usd series feed straight into the Step 4 alert rules — no extra wiring needed.

Example 2: Guard against a 429 using rate-limit headers

Read the x-ratelimit-remaining-* headers off a response and back off before the quota is exhausted, instead of catching the 429 after the fact.

const response = await groq.chat.completions.with_raw_response.create({
  model: "llama-3.1-8b-instant",
  messages: [{ role: "user", content: "classify: positive or negative?" }],
});

const remaining = trackRateLimitHeaders(response.headers);
// remaining -> { requests: 4, tokens: 12000 }

if (remaining.requests < 5) {
  // The GroqRateLimitCritical alert (Step 4) is already firing at this point.
  await new Promise((r) => setTimeout(r, 1000)); // simple backoff
}

Example 3: Reading the dashboard

With the panels from Step 6 in place, a healthy Groq deployment reads:

Panel Healthy Investigate
TTFT Distribution P95 < 500ms P95 > 1s → GroqLatencyHigh
Tokens/Second 280–560 < 100 → GroqThroughputDrop
Rate Limit Utilization < 90% > 90% → approaching GroqRateLimitCritical
Error Rate < 1% > 5% → GroqErrorRateHigh
Queue Time < 50ms sustained > 200ms → Groq-side congestion

When any panel crosses into the "investigate" column, hand off to the groq-incident-runbook skill for response procedures.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides a robust framework for monitoring Groq API performance, token usage, and costs using Prometheus and structured logging. It follows industry security best practices for credential management and relies on standard, well-known libraries for its implementation.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files
version
1.11.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "groq",
  "monitoring",
  "observability",
  "dashboard"
]
All 3 allowed tools
ReadWriteEdit
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/groq-observability