# Implement Observability for Node.js Services

Production services need consistent logs, metrics, traces, alerts, and health probes. This skill provides practical TypeScript and Prometheus templates for adding that visibility.

## Install

```bash
npx skillstore add ariegoldkin/observability-monitoring
```

## Metadata

- - Slug: ariegoldkin-observability-monitoring
- - Version: 1.0.0
- - Author: ArieGoldkin
- - GitHub username: ArieGoldkin
- - License: MIT
- - Repository: https://github.com/ArieGoldkin/ai-agent-hub/tree/main/skills/observability-monitoring
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: medium
- - Risk factors: network, env\_access, external\_commands
- - Quality score: 50
- - Quality tier: warning
- - Public page: https://skillstore.pages.dev/skills/ariegoldkin-observability-monitoring
- - Manifest: https://skillstore.pages.dev/api/skills/ariegoldkin-observability-monitoring/manifest

## Capabilities

- Provides Winston structured logging patterns with request correlation IDs.
- Defines Prometheus HTTP, database, cache, and business metric examples.
- Shows OpenTelemetry setup with Node.js auto-instrumentation and manual spans.
- Includes Express health, readiness, and startup probe templates.
- Supplies Prometheus alerting rules for service, error rate, latency, memory, database, and cache signals.

## Use Cases

- Add baseline service observability: Introduce structured request logs, RED metrics, and health probes to a new Node.js service.
- Prepare production alerting: Create Prometheus alerts for outages, error spikes, latency, memory pressure, database pool exhaustion, and cache degradation.
- Improve incident diagnosis: Connect logs, metrics, and traces so teams can investigate request failures across service boundaries.

## Prompt Templates

### Add basic request logging

```
Use this skill to add structured request logging to my Express service. Include correlation IDs, useful fields, and safe redaction recommendations.
```

### Create service metrics

```
Use this skill to design Prometheus metrics for HTTP requests, database latency, cache hits, and key business events in my Node.js app.
```

### Set up distributed tracing

```
Use this skill to add OpenTelemetry tracing to my service. Include auto-instrumentation, manual spans, exporter configuration, and privacy safeguards.
```

### Design an incident-ready monitoring package

```
Use this skill to review my service for production observability. Propose logs, metrics, traces, alerts, health checks, dashboards, and rollout steps.
```

## Limitations

- Templates are examples and must be adapted to each application architecture.
- The skill does not deploy monitoring infrastructure or dashboards automatically.
- Security controls such as log redaction and endpoint authentication are not fully implemented.
- Examples focus on Node.js, Express, Prometheus, Winston, and OpenTelemetry.

## Best Practices

- Define redaction rules before enabling production request logging or tracing.
- Start with a small alert set tied to user impact, then tune thresholds from real traffic.
- Use consistent service names, versions, environments, and correlation IDs across all telemetry.

## Anti Patterns

- Do not log full request bodies, tokens, passwords, session IDs, or unfiltered query strings.
- Do not expose health, readiness, metrics, or tracing endpoints publicly without access controls.
- Do not create alerts for every metric before defining ownership, severity, and response actions.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T10:08:13.523\+00:00
- - Summary: The static critical finding is dismissed: the apparent command execution and weak cryptography hits are Markdown fences, comments, alert durations, imports, and normal configuration reads. The skill is not malicious, but it includes reusable logging and tracing templates that can collect request metadata, error details, and trace attributes, so publication should include a privacy warning.

## Stats

- - Views: 232
- - Downloads: 4
- - Favorites: 0
- - Popularity score: 0
