error-logger
Strukturierte Fehlerprotokollierung hinzufügen
Das Debuggen verteilter Systeme ist ohne korrelierte Logs eine Herausforderung. Dieses Skill bietet strukturierte JSON-Protokollierung mit automatischer Weitergabe von Korrelations-IDs über Services hinweg, wodurch es einfacher wird, Anfragen durch komplexe Microservice-Architekturen zu verfolgen.
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「error-logger」。 Fehlerprotokollierung zu einer Zahlungsabwicklungsfunktion hinzufügen
預期結果:
- Correlation ID: op_507f1c7b_3a2b1c4d
- {
- "level": "error",
- "timestamp": "2026-01-21T14:45:38.222Z",
- "correlation_id": "op_507f1c7b_3a2b1c4d",
- "operation": "payment_process",
- "error": "TX_REVERT",
- "message": "Insufficient funds",
- "context": {
- "transaction_hash": "0x1a2b...",
- "account_id": "acc_12345"
- }
- }
正在使用「error-logger」。 Korrelations-ID-Weitergabe für einen API-Endpoint einrichten
預期結果:
- Incoming request headers:
- X-Correlation-ID: quo_a1b2c3d4_e5f6g7h8
- Outgoing request with propagated ID:
- X-Correlation-ID: quo_a1b2c3d4_e5f6g7h8
- Log entry created:
- correlation_id: quo_a1b2c3d4_e5f6g7h8
- service: order-api
- action: create_order
安全審計
安全All static findings evaluated as false positives. SHA256 hashes flagged as weak crypto are secure cryptographic values in metadata. Backtick references in documentation are markdown formatting, not shell execution. This is a legitimate logging library skill with no malicious code or operations.
高風險問題 (3)
低風險問題 (1)
風險因素
🌐 網路存取 (1)
📁 檔案系統存取 (1)
品質評分
你能建構什麼
Microservice-Fehler debuggen
Verfolgen Sie eine Anfrage, während sie durch mehrere Services fließt, indem Sie Logs mit gemeinsamen IDs korrelieren. Identifizieren Sie, welcher Service einen Fehler verursacht hat und an welchem Punkt.
Transaktionsverarbeitung überwachen
Verfolgen Sie Finanz- oder Datentransaktionen über Services hinweg mithilfe von Korrelations-IDs. Protokollieren Sie jeden Schritt mit Kontext für spätere Analyse und Auditing.
Produktionsvorfälle untersuchen
Lokalisieren Sie schnell alle zugehörigen Protokolleinträge für eine fehlgeschlagene Anfrage anhand der Korrelations-ID. Reduzieren Sie die mittlere Zeit bis zur Diagnose während Produktionsvorfällen.
試試這些提示
Add error logging to function [FUNCTION_NAME] using the error-logger skill. Include correlation ID tracking and log the error with context.
Implement correlation ID propagation for HTTP requests. Extract X-Correlation-ID from incoming requests and attach it to outgoing requests.
Implement transaction tracking for [TRANSACTION_TYPE] using the error-logger skill. Use the appropriate correlation ID prefix and log each service interaction.
Debug a cross-service request flow. Identify where failures occur by correlating logs across services and extracting the correlation chain.
最佳實務
- Geben Sie Korrelations-IDs immer an nachgelagerte Services weiter, um die Trace-Kontinuität aufrechtzuerhalten
- Fügen Sie ausreichend Kontext in Protokolleinträge ein, um Debugging ohne zusätzliche Log-Abfragen zu ermöglichen
- Verwenden Sie das passende Korrelations-ID-Präfix (liq, arb, quo, op) für den jeweiligen Operationstyp
避免
- Neue Korrelations-IDs für jeden Service generieren, anstatt die vorhandene weiterzugeben
- Fehler ohne Kontext wie Transaktions-IDs oder Benutzeridentifikatoren protokollieren
- Korrelations-IDs verwenden, die keine Zeitstempel für zeitbasierte Analysen enthalten