← スキル一覧に戻る

nestjs-observability
by ngxtm
⭐ 0🍴 0📅 2026年1月23日
SKILL.md
name: NestJS Observability description: Structured logging (Pino) and Prometheus metrics. metadata: labels: [nestjs, logging, monitoring, pino] triggers: files: ['main.ts', '**/*.module.ts'] keywords: [nestjs-pino, Prometheus, Logger, reqId]
Observability Standards
Structured Logging
- Standard: Use
nestjs-pinofor high-performance JSON logging.- Why: Node's built-in
console.logis blocking and unstructured.
- Why: Node's built-in
- Configuration:
- Redaction: Mandatory masking of sensitive fields (
password,token,email). - Context: Always inject
Loggerand set the context (LoginService).
- Redaction: Mandatory masking of sensitive fields (
Tracing (Correlation)
- Request ID: Every log line must include a
reqId(Request ID).nestjs-pinohandles this automatically usingAsyncLocalStorage.- Propagation: Pass
x-request-idto downstream microservices/database queries key to trace flows.
Metrics
- Exposure: Use
@willsoto/nestjs-prometheusto expose/metricsfor Prometheus scraping. - Key Metrics:
http_request_duration_seconds(Histogram)db_query_duration_seconds(Histogram)memory_usage_bytes(Gauge)
Health Checks
- Terminus: Implement explicit logic for "Liveness" (I'm alive) vs "Readiness" (I can take traffic).
- DB Check:
TypeOrmHealthIndicator/PrismaHealthIndicator. - Memory Check: Fail if Heap > 300MB (prevent crash loops).
- DB Check:
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です