| name | ideogram-observability |
| description | Set up monitoring, metrics, and alerts for Ideogram integrations.
Use when implementing observability for Ideogram operations, tracking costs,
or configuring alerting for generation health.
Trigger with phrases like "ideogram monitoring", "ideogram metrics",
"ideogram observability", "monitor ideogram", "ideogram alerts", "ideogram dashboard".
|
| allowed-tools | Read, Write, Edit |
| version | 1.10.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","ideogram","monitoring","observability"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Ideogram Observability
Overview
Monitor Ideogram AI image generation for latency, cost, error rates, and content safety rejections. Key metrics: generation duration (5-25s depending on model), credit burn rate, safety filter rejection rate, and API availability. Ideogram's API is synchronous, so all observability is request-level instrumentation.
Key Metrics
| Metric | Type | Labels | Alert Threshold |
|---|
ideogram_generation_duration_ms | Histogram | model, style, speed | P95 > 25s |
ideogram_generations_total | Counter | model, status | Error rate > 5% |
ideogram_credits_estimated | Counter | model | >$10/hour |
ideogram_safety_rejections | Counter | reason | >10% rejection rate |
ideogram_image_downloads | Counter | status | Download failures > 1% |
Instructions
Step 1: Instrumented Generation Wrapper
import { performance } from "perf_hooks";
interface GenerationMetrics {
duration: number;
model: string;
style: string;
status: "success" | "error" | "safety_rejected" | "rate_limited";
seed?: number;
resolution?: string;
}
const metricsLog: GenerationMetrics[] = [];
async function () {
model = options. ?? ;
style = options. ?? ;
start = performance.();
{
response = (, {
: ,
: {
: process..!,
: ,
},
: .({
: { prompt, model, : style, ...options, : },
}),
});
duration = performance.() - start;
(response. === ) {
({ duration, model, style, : });
();
}
(response. === ) {
({ duration, model, style, : });
();
}
(!response.) {
({ duration, model, style, : });
();
}
result = response.();
image = result.[];
({
duration, model, style, : ,
: image., : image.,
});
result;
} (err) {
(!metricsLog.( m. === performance.() - start)) {
({ : performance.() - start, model, style, : });
}
err;
}
}
() {
metricsLog.(metric);
.(.({
: ,
...metric,
: ().(),
}));
}