miro-observability
Set up observability for Miro REST API v2 integrations with Prometheus metrics, OpenTelemetry traces, structured logging, and Grafana dashboards. Trigger with phrases like "miro monitoring", "miro metrics", "miro observability", "monitor miro", "miro alerts", "miro tracing".
What this skill does
# Miro Observability
## Overview
Comprehensive monitoring for Miro REST API v2 integrations: Prometheus metrics for request rates and latency, OpenTelemetry traces for request flow, structured logging, and alerting for rate limit and error conditions.
## Key Metrics
| Metric | Type | Labels | Purpose |
|--------|------|--------|---------|
| `miro_requests_total` | Counter | method, endpoint, status | Request volume |
| `miro_request_duration_seconds` | Histogram | method, endpoint | Latency distribution |
| `miro_errors_total` | Counter | error_type, endpoint | Error tracking |
| `miro_rate_limit_remaining` | Gauge | — | Credit headroom |
| `miro_rate_limit_credits_used` | Gauge | — | Credit consumption |
| `miro_webhook_events_total` | Counter | event_type, item_type | Webhook volume |
| `miro_token_refresh_total` | Counter | status | OAuth health |
## Prometheus Metrics
```typescript
import { Registry, Counter, Histogram, Gauge } from 'prom-client';
const registry = new Registry();
registry.setDefaultLabels({ app: 'miro-integration' });
const requestCounter = new Counter({
name: 'miro_requests_total',
help: 'Total Miro REST API v2 requests',
labelNames: ['method', 'endpoint', 'status'] as const,
registers: [registry],
});
const requestDuration = new Histogram({
name: 'miro_request_duration_seconds',
help: 'Miro API request latency',
labelNames: ['method', 'endpoint'] as const,
buckets: [0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10],
registers: [registry],
});
const errorCounter = new Counter({
name: 'miro_errors_total',
help: 'Miro API errors by type',
labelNames: ['error_type', 'endpoint'] as const,
registers: [registry],
});
const rateLimitRemaining = new Gauge({
name: 'miro_rate_limit_remaining',
help: 'Miro rate limit credits remaining',
registers: [registry],
});
const rateLimitUsed = new Gauge({
name: 'miro_rate_limit_credits_used',
help: 'Miro rate limit credits used in current window',
registers: [registry],
});
const webhookCounter = new Counter({
name: 'miro_webhook_events_total',
help: 'Miro webhook events received',
labelNames: ['event_type', 'item_type'] as const,
registers: [registry],
});
```
## Instrumented API Client
```typescript
class InstrumentedMiroClient {
async fetch<T>(path: string, method = 'GET', body?: unknown): Promise<T> {
const endpoint = this.normalizeEndpoint(path);
const timer = requestDuration.startTimer({ method, endpoint });
try {
const response = await fetch(`https://api.miro.com${path}`, {
method,
headers: {
'Authorization': `Bearer ${this.token}`,
'Content-Type': 'application/json',
},
...(body ? { body: JSON.stringify(body) } : {}),
});
// Update rate limit metrics from response headers
const remaining = response.headers.get('X-RateLimit-Remaining');
const limit = response.headers.get('X-RateLimit-Limit');
if (remaining) rateLimitRemaining.set(parseInt(remaining));
if (remaining && limit) {
rateLimitUsed.set(parseInt(limit) - parseInt(remaining));
}
requestCounter.inc({ method, endpoint, status: String(response.status) });
if (!response.ok) {
const errorType = response.status === 429 ? 'rate_limit'
: response.status === 401 ? 'auth'
: response.status >= 500 ? 'server'
: 'client';
errorCounter.inc({ error_type: errorType, endpoint });
throw new MiroApiError(response.status, await response.text());
}
return response.status === 204 ? null as T : await response.json();
} catch (error) {
if (!(error instanceof MiroApiError)) {
errorCounter.inc({ error_type: 'network', endpoint });
}
throw error;
} finally {
timer();
}
}
// Normalize endpoints for metric cardinality control
// /v2/boards/uXjVN123/items/345 → /v2/boards/{id}/items/{id}
private normalizeEndpoint(path: string): string {
return path
.replace(/\/boards\/[^/]+/, '/boards/{id}')
.replace(/\/items\/[^/]+/, '/items/{id}')
.replace(/\/sticky_notes\/[^/]+/, '/sticky_notes/{id}')
.replace(/\/shapes\/[^/]+/, '/shapes/{id}')
.replace(/\/connectors\/[^/]+/, '/connectors/{id}')
.replace(/\?.*$/, '');
}
}
```
## OpenTelemetry Tracing
```typescript
import { trace, SpanStatusCode, context } from '@opentelemetry/api';
const tracer = trace.getTracer('miro-client', '1.0.0');
async function tracedMiroFetch<T>(
path: string,
method: string,
body?: unknown,
): Promise<T> {
const endpoint = normalizeEndpoint(path);
return tracer.startActiveSpan(`miro.${method} ${endpoint}`, async (span) => {
span.setAttribute('miro.method', method);
span.setAttribute('miro.endpoint', endpoint);
span.setAttribute('miro.api_version', 'v2');
try {
const result = await instrumentedClient.fetch<T>(path, method, body);
span.setStatus({ code: SpanStatusCode.OK });
return result;
} catch (error: any) {
span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
span.setAttribute('miro.error_status', error.status ?? 0);
span.recordException(error);
throw error;
} finally {
span.end();
}
});
}
```
## Structured Logging
```typescript
import pino from 'pino';
const logger = pino({
name: 'miro-integration',
level: process.env.LOG_LEVEL ?? 'info',
redact: ['token', 'accessToken', 'refreshToken', 'Authorization'],
});
function logMiroRequest(method: string, path: string, status: number, durationMs: number) {
logger.info({
service: 'miro',
event: 'api_request',
method,
path: normalizeEndpoint(path),
status,
durationMs: Math.round(durationMs),
rateLimitRemaining: currentRateLimitRemaining,
});
}
function logWebhookEvent(event: MiroBoardEvent) {
logger.info({
service: 'miro',
event: 'webhook_received',
eventType: event.type, // create | update | delete
itemType: event.item.type, // sticky_note | shape | card | etc.
boardId: event.boardId,
itemId: event.item.id,
});
}
```
## Alert Rules (Prometheus AlertManager)
```yaml
# alerts/miro.yaml
groups:
- name: miro_alerts
rules:
- alert: MiroHighErrorRate
expr: |
rate(miro_errors_total[5m]) /
rate(miro_requests_total[5m]) > 0.05
for: 5m
labels:
severity: warning
annotations:
summary: "Miro API error rate > 5%"
dashboard: "https://grafana.myapp.com/d/miro"
- alert: MiroHighLatency
expr: |
histogram_quantile(0.95,
rate(miro_request_duration_seconds_bucket[5m])
) > 3
for: 5m
labels:
severity: warning
annotations:
summary: "Miro API P95 latency > 3 seconds"
- alert: MiroRateLimitLow
expr: miro_rate_limit_remaining < 5000
for: 1m
labels:
severity: critical
annotations:
summary: "Miro rate limit credits < 5000 remaining"
runbook: "Reduce request rate immediately. See miro-rate-limits skill."
- alert: MiroAuthFailures
expr: rate(miro_errors_total{error_type="auth"}[5m]) > 0
for: 2m
labels:
severity: critical
annotations:
summary: "Miro authentication failures detected"
runbook: "Check token expiry. Verify OAuth scopes."
- alert: MiroDown
expr: |
sum(rate(miro_requests_total{status=~"5.."}[5m])) /
sum(rate(miro_requests_total[5m])) > 0.5
for: 3m
labels:
severity: critical
annotations:
summary: "Miro API >50% server errors — check status.miro.com"
```
## Grafana Dashboard Panels
```json
{
"panels": [
{
"title": "Miro Request Rate (req/s)",
"targets": [{ "expr": "sum(rate(miro_requests_total[1m]))" }]
},
{
"tRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.