logging-observability
Logging and observability best practices — structured logging, log levels, correlation IDs, metrics, tracing, and alerting.
Skill by Claude-Code-Community-Ireland
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/claude-code-community-ireland-logging-observability
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/logging-observability
What's inside
- Skill name
logging-observability- Description
- Logging and observability best practices — structured logging, log levels, correlation IDs, metrics, tracing, and alerting. Reference when implementing logging or monitoring.
- License
- MIT
- Instructions
- 380 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Logging and Observability
## Structured Logging
Always use structured logging (JSON format) instead of unstructured text. Structured logs are machine-parseable, searchable, and can be aggregated across services.
### Standard Log Entry Format
```json
{
"timestamp": "2024-03-15T14:30:22.123Z",
"level": "INFO",
"message": "Order processed successfully",
"service": "order-service",
"version": "1.4.2",
"correlationId": "req-abc123",
"userId": "user-456",
"orderId": "ord-789",
"durationMs": 234,
"environment": "production"
}
```
### Required Fields
Every log entry must include:
| Field | Type | Description |
|-------|------|-------------|
| `timestamp` | ISO 8601 string | When the event occurred (UTC) |
| `level` | string | Log severity level |
| `message` | string | Human-readable description of the event |
| `service` | string | Name of the service emitting the log |
### Recommended Fields
| Field | Type | Description |
|-------|------|-------------|
| `correlationId` | string | Request or trace identifier for cross-service correlation |
| `version` | string | Application version or commit hash |
| `environment` | string | Deployment environment (production, staging, etc.) |
| `userId` | string | Authenticated user identifier (if applicable) |
| `durationMs` | number | Operation duration in milliseconds |
| `error` | object | Error details when level is ERROR |
### Implementation Examples
```javascript
// Node.js with pino
const pino = require('pino');
const logger = pino({
level: process.env.LOG_LEVEL || 'info',
formatters: { level: (label) => ({ level: label.toUpperCase() }) },
timestamp: pino.stdTimeFunctions.isoTime,
base: { service: 'order-service', version: process.env.APP_VERSION || 'unknown' },
});
logger.info({ orderId: 'ord-789', durationMs: 234 }, 'Order processed successfully');
logger.error({ err, orderId: 'ord-789' }, 'Failed to process order');
```
```python
# Python with structlog
import structlog
structlog.configure(processors=[
structlog.processors.TimeStamper(fmt="iso"),
structlog.processors.add_log_level,
structlog.processors.JSONRenderer(),
])
logger = structlog.get_logger(service="order-service")
logger.info("order_processed", order_id="ord-789", duration_ms=234)
```
## Log Levels Usage Guide
Choose the correct log level based on the audience and urgency:
| Level | When to Use | Examples | Audience |
|-------|-------------|----------|----------|
| **ERROR** | Something failed and requires attention. The operation could not complete. | Unhandled exception, database connection lost, payment processing failed, external API returned 5xx | On-call engineer (triggers alert) |
| **WARN** | Something unexpected happened but the operation continued. May need attention soon. | Deprecated API used, retry succeeded after failure, cache miss on hot path, connection pool near limit | Engineering team (review in daily triage) |
| **INFO** | Normal operational events worth recording. The happy path. | Request handled, order created, user logged in, migration completed, deploy started | Operations team (dashboard monitoring) |
| **DEBUG** | Detailed information useful for diagnosing issues. Not enabled in production by default. | SQL query with parameters, HTTP request/response details, cache hit/miss, algorithm intermediate steps | Developers (enabled during investigation) |
| **TRACE** | Very fine-grained detail. Rarely used outside local development. | Function entry/exit, loop iterations, variable state at each step | Developers (local debugging only) |
### Level Selection Rules
- If it means waking someone up at 3 AM, it is **ERROR**.
- If it means something is degraded but not broken, it is **WARN**.
- If it is the normal outcome of a user or system action, it is **INFO**.
- If it would help debug a problem but is too noisy for production, it is **DEBUG**.
- If you would only want it while stepping through code, it is **TRACE**.
## What to Log and What NOT to Log
### Log These Events
| Category | Events |
|----------|--------|
| Requests | Incoming HTTP requests (method, path, status, duration). API calls to external services. |
| Authentication | Login success, login failure, logout, session expiry, MFA challenge. |
| Authorization | Access denied events with user, resource, and required permission. |
| Errors | Unhandled exceptions, failed operations, timeout events, circuit breaker trips. |
| State Changes | Record creation/update/deletion, status transitions, configuration changes. |
| Performance | Slow queries (above threshold), response time percentiles, queue depth. |
| Business Events | Order placed, payment processed, subscription changed, export completed. |
### Never Log These
| Category | Reason | Alternative |
|----------|--------|-------------|
| Passwords | Credential exposure | Log event type only ("login_attempt") |
| API keys and tokens | Credential exposure | Log last 4 characters at most |
| Credit card numbers | PCI compliance violation | Log last 4 digits only |
| Social Security Numbers | PII regulation violation | Log event type only |
| Session tokens | Session hijacking risk | Log session ID prefix or hash |
| Personal health data | HIPAA violation | Log event type with anonymized reference |
| Full request bodies with sensitive fields | Data exposure | Log sanitized version or field names only |From Claude-Code-Community-Ireland/claude-code-resources, MIT.
More from Claude-Code-Community-Ireland/claude-code-resources
- 0.477score
start-of-day
Claude-Code-Community-Ireland
Comprehensive daily project sync - checks git repos, analyzes all code, reads documentation, and provides status report.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
performance-profiling
Claude-Code-Community-Ireland
Performance analysis methodology — identifying bottlenecks, profiling techniques, benchmarking, and common optimization patterns.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
architecture-decision-record
Claude-Code-Community-Ireland
ADR format and methodology for documenting significant technical decisions with context, alternatives considered, and consequences.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
incident-response
Claude-Code-Community-Ireland
Incident response procedures — triage, communication, investigation, mitigation, and post-incident review.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
conventional-commits
Claude-Code-Community-Ireland
Generate well-formatted conventional commit messages from staged changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
tdd-workflow
Claude-Code-Community-Ireland
Test-driven development methodology — red-green-refactor cycle, writing failing tests first, minimal implementation, and iterative refinement.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
debugging-systematic
Claude-Code-Community-Ireland
Systematic debugging methodology — binary search isolation, hypothesis-driven debugging, reproducing issues, and root cause analysis.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
dependency-audit
Claude-Code-Community-Ireland
Dependency management and auditing — evaluating new dependencies, security vulnerability scanning, update strategies, and license compliance.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
community-code-reviewer
Claude-Code-Community-Ireland
Perform thorough, constructive code reviews on pull requests and code changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
finish-the-day
Claude-Code-Community-Ireland
End-of-day wrap up - analyzes all work done, creates detailed daily update log, commits all changes, and pushes to remote.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
discord
Claude-Code-Community-Ireland
Manage your Discord server - post announcements, create events, moderate, and more.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
refactoring-patterns
Claude-Code-Community-Ireland
Safe refactoring techniques — extract method, rename, move, inline, and structural patterns.
SkillDFreshness: D★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 4
- Open issues
- 4
- Last commit (this folder)
- Jan 29, 2026 (9 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Claude-Code-Community-Ireland
- 0.477score
debugging-systematic
Claude-Code-Community-Ireland
Systematic debugging methodology — binary search isolation, hypothesis-driven debugging, reproducing issues, and root cause analysis.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
dependency-audit
Claude-Code-Community-Ireland
Dependency management and auditing — evaluating new dependencies, security vulnerability scanning, update strategies, and license compliance.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
architecture-decision-record
Claude-Code-Community-Ireland
ADR format and methodology for documenting significant technical decisions with context, alternatives considered, and consequences.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
community-code-reviewer
Claude-Code-Community-Ireland
Perform thorough, constructive code reviews on pull requests and code changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
conventional-commits
Claude-Code-Community-Ireland
Generate well-formatted conventional commit messages from staged changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
discord
Claude-Code-Community-Ireland
Manage your Discord server - post announcements, create events, moderate, and more.
SkillDFreshness: D★ 11Claude Code +9
Cite this page
logging-observability skill. Agent Mart. https://agentmart.dev/skills/claude-code-community-ireland-logging-observability (last updated 2026-10-24)