lokalise-observability
Set up comprehensive observability for Lokalise integrations with metrics, traces, and alerts. Use when implementing monitoring for Lokalise operations, setting up dashboards, or configuring alerting for Lokalise integration health. Trigger with phrases like "lokalise monitoring", "lokalise metrics", "lokalise observability", "monitor lokalise", "lokalise alerts", "lokalise tracing".
- License 许可
- MIT
- 最近更新
- 2026-03-20
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- lokalise-observability
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Set up comprehensive observability for Lokalise integrations with metrics, traces, and alerts. Use when implementing monitoring for Lokalise operations, setting up dashboards, or configuring alerting for Lokalise integration health. Trigger with phrases like "lokalise monitoring", "lokalise metrics", "lokalise observability", "monitor lokalise", "lokalise alerts", "lokalise tracing".
- allowed-tools
- Read, Write, Edit
- compatible-with
- claude-code, codex, openclaw
03 SKILL.md 正文
Lokalise Observability
Overview
Monitor Lokalise translation pipeline health including API response times, key completion rates, webhook delivery reliability, and translation throughput.
Prerequisites
- Lokalise API integration with
@lokalise/node-apiSDK - Metrics backend (Prometheus, Datadog, or CloudWatch)
- Webhook endpoint for Lokalise project events
Instructions
Step 1: Track API Call Metrics
import { LokaliseApi } from '@lokalise/node-api';
const lok = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! });
async function trackedApiCall<T>(operation: string, fn: () => Promise<T>): Promise<T> {
const start = performance.now();
try {
const result = await fn();
emitMetric('lokalise_api_duration_ms', performance.now() - start, { operation, status: 'ok' });
emitMetric('lokalise_api_requests_total', 1, { operation, status: 'ok' });
return result;
} catch (err: any) {
emitMetric('lokalise_api_requests_total', 1, { operation, status: 'error', code: err.code });
throw err;
}
}
// Usage
const keys = await trackedApiCall('keys.list', () => lok.keys().list({ project_id: projectId, limit: 500 })); # HTTP 500 Internal Server Error
Step 2: Monitor Translation Completion
// Poll translation progress per locale and emit as gauge metrics
async function checkTranslationProgress(projectId: string) {
const stats = await lok.translationStatuses().list({ project_id: projectId });
const languages = await lok.languages().list({ project_id: projectId });
for (const lang of languages.items) {
const progress = lang.words_translated / Math.max(lang.words_total, 1) * 100;
emitGauge('lokalise_translation_progress_pct', progress, { project: projectId, locale: lang.lang_iso });
}
}
Step 3: Configure Webhooks for Real-Time Events
set -euo pipefail
# Register a webhook for project completion events
curl -X POST "https://api.lokalise.com/api2/projects/PROJECT_ID/webhooks" \
-H "X-Api-Token: $LOKALISE_API_TOKEN" \
-d '{
"url": "https://hooks.company.com/lokalise",
"events": ["project.translation_completed", "project.exported", "project.key.added"],
"event_lang_map": [{"event": "project.translation_completed", "lang_iso_codes": ["fr", "de", "ja"]}]
}'
Step 4: Alert on Pipeline Issues
groups:
- name: lokalise
rules:
- alert: LokaliseApiRateLimited
expr: rate(lokalise_api_requests_total{status="error", code="429"}[5m]) > 0 # HTTP 429 Too Many Requests
annotations: { summary: "Lokalise API rate limit hit (6 req/s cap)" }
- alert: TranslationStalled
expr: lokalise_translation_progress_pct < 50 and time() - lokalise_last_translation_activity > 86400 # 86400: timeout: 24 hours
annotations: { summary: "Translation progress stalled for 24+ hours" }
- alert: WebhookDeliveryFailing
expr: rate(lokalise_webhook_failures_total[1h]) > 3
annotations: { summary: "Lokalise webhook deliveries failing" }
Step 5: Build a Translation Pipeline Dashboard
Key panels: API request rate and latency, translation completion % by locale (bar chart), daily keys added/modified, webhook delivery success rate, and per-word cost tracking (Lokalise charges per word for machine translation features).
Error Handling
| Issue | Cause | Solution |
|---|---|---|
429 Too Many Requests |
Exceeded 6 req/s rate limit | Add request throttling with p-queue |
| Webhook not firing | Wrong event type registered | Verify event names in webhook config |
| Progress metric stuck at 0 | Language not added to project | Add target locale in project settings |
| Stale cache data | Long TTL on translation cache | Invalidate on webhook event receipt |
Examples
Basic usage: Apply lokalise observability to a standard project setup with default configuration options.
Advanced scenario: Customize lokalise observability for production environments with multiple constraints and team-specific requirements.
Output
- Configuration files or code changes applied to the project
- Validation report confirming correct implementation
- Summary of changes made and their rationale
Resources
- Official monitoring documentation
- Community best practices and patterns
- Related skills in this plugin pack
04 同仓库更多 Skills
azure-apim-architecture
Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.
apiops-deployment
Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep/Terraform), CI/CD pipelines (GitHub Actions/Azure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.
apim-policy-authoring
Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request/response processing logic.
api-security-review
Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.
jira-cli
Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.
calculator
Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.