Notre avis
Affiche et filtre les logs des services d'une plateforme de trading, avec prise en charge de Docker Compose et Kubernetes.
Points forts
- Filtrage avancé par service, niveau de log, expression régulière et erreurs uniquement.
- Mode suivi en direct (--follow) pour observer les logs en continu.
- Résumé des erreurs avec comptage et messages les plus récents.
- Contexte autour des correspondances pour les recherches regex.
Limites
- Nécessite que les services soient déployés avec Docker Compose ou Kubernetes.
- Les motifs de logs reconnus sont spécifiques à une plateforme de trading.
- La fonctionnalité avancée (stern, kubectl) dépend de l'infrastructure cible.
Utilisez cette compétence pour déboguer ou surveiller les logs d'une application en environnement de développement ou de staging.
Ne l'utilisez pas pour des logs en production nécessitant une solution centralisée de gestion de logs (ELK, Splunk).
Analyse de sécurité
PrudenceThe skill is designed to access and filter logs via legitimate tools (docker, kubectl, stern). It does not instruct destructive actions, but the use of powerful shell commands with potentially unsanitized user input presents a moderate risk. The skill is inherently meant for debugging, but caution is warranted.
- •Uses docker and kubectl commands with user-supplied arguments, which could allow command injection if the agent does not sanitize inputs (e.g., service name with shell metacharacters).
- •Log output may contain sensitive information (API keys, tokens, PII) depending on the logging practices of the services.
Exemples
Show me the last 50 lines of logs from all services.Search logs for 'order.*failed' and show matches with context lines.Show me only error logs from the last 30 minutes across all services.name: logs description: Tail and search service logs with filtering argument-hint: "[service|--search pattern|--errors]"
Log Viewer
Tail and search logs across trading platform services.
Usage
/logs- Tail all services (last 100 lines)/logs api- Tail specific service/logs --errors- Show only errors across all services/logs --search "order.*failed"- Search with regex/logs api --since 1h- Logs from last hour/logs --level error- Filter by log level/logs executor --follow- Live tail (follow mode)
Services
| Service | Container | Log Path | |---------|-----------|----------| | api | trading-api | stdout | | ui | trading-ui | stdout | | executor | trading-executor | stdout | | risk | trading-risk | stdout | | worker | trading-worker | stdout | | ml-server | ml-server | stdout | | market-ingest | market-ingest | stdout | | backtester | backtester | stdout |
Instructions
When this skill is invoked:
-
Parse arguments:
- Service name: Filter to specific service
--errors: Filterlevel=errororlevel=ERROR--search <pattern>: Grep with regex pattern--since <duration>: Time filter (1h, 30m, 1d)--level <level>: Filter by log level--follow/-f: Live tail mode--lines N/-n N: Number of lines (default 100)
-
For Docker Compose (dev):
# Single service docker compose logs $SERVICE --tail $LINES $FOLLOW_FLAG # All services with grep docker compose logs --tail $LINES | grep -E "$PATTERN" # Errors only docker compose logs --tail 500 | grep -iE "error|exception|failed|traceback" -
For Kubernetes (staging/prod):
# Single pod kubectl logs -l app=$SERVICE -n trading --tail=$LINES $FOLLOW_FLAG # With stern for multi-pod stern $SERVICE -n trading --since $SINCE -
Display formatted output:
[09:31:05] api INFO Request: POST /orders [09:31:05] executor INFO Order received: abc123 [09:31:06] executor ERROR Order failed: insufficient margin [09:31:06] risk WARN Margin utilization at 95% -
For
--errors, highlight and summarize:ERROR SUMMARY (last 1h) ───────────────────────────────────────────────────────── executor 12 errors "insufficient margin" (8), "timeout" (4) api 3 errors "validation failed" (3) ml-server 1 error "model not found" (1) Most recent errors: [09:31:06] executor Order failed: insufficient margin for AAPL x100 [09:30:45] executor Connection timeout to broker -
For
--search, show matches with context:- 2 lines before and after each match
- Highlight matching text
- Show total match count
-
Common log patterns to recognize:
- Order lifecycle: submitted → acknowledged → filled/rejected
- Errors: exceptions, tracebacks, failed operations
- Performance: slow queries, timeouts
- Security: auth failures, rate limits
Architecte Docker Compose
DevOps
Concoit des configurations Docker Compose optimisees.
Rapport de Post-Mortem
DevOps
Rédige des rapports post-mortem d'incidents structurés et blameless.
Créateur de Runbooks
DevOps
Crée des runbooks opérationnels clairs pour les procédures DevOps courantes.