Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Node.js Structured Logging and Tracing Setup

    by Saizul Amin

    1

    This skill gives your agent a proven procedure plus scripts that check the facts, so you get the same correct answer every time, with exact fixes instead of vague advice.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Node.js Structured Logging and Tracing Setup

    Node.js Structured Logging and Tracing Setup

    Example session with this skill installed

    Run the Node.js Structured Logging and Tracing Setup skill on my project and give me a prioritised list of what to fix, with exact changes.

    • Read your context and instructions
    • Compiled the node js structured

    Here is what the Node.js Structured Logging and Tracing Setup skill produced.

    Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.

    Output

    logging check: 1 file(s) scanned
      HIGH   log.sensitive                -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:14
             log call includes 'password'
             fix: log ids, not credentials; configure redact paths (pino redact) for anything that might slip in
      HIGH   log.sensitive                -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:15
             log call includes 'req.headers'
             fix: log ids, not credentials; configure redact paths (pino redact) for anything that might slip in
      MEDIUM pino.no_redact               -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js
             pino is used without redact paths
             fix: redact: { paths: ['req.headers.authorization', 'req.headers.cookie', '*.password', '*.token'], censor: '[redacted]' }
      MEDIUM otel.late_init               -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:6
             NodeSDK is created in a file that also imports the app/framework/drivers: auto-instrumentation may load too late to patch them
             fix: put the SDK in instrumentation.(m)js and start node with --import ./instrumentation.mjs (ESM) or --require ./instrumentation.js (CJS)
      MEDIUM log.sensitive                -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:13
             log call includes the whole request body (passwords, PII)
             fix: log selected fields, or redact: ['req.body.password', ...]
      MEDIUM log.sensitive                -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:16
             log call includes the whole request body (passwords, PII)
             fix: log selected fields, or redact: ['req.body.password', ...]
      MEDIUM log.pino_error_dropped       -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:25
             pino ignores extra arguments without %s placeholders: the error is not logged
             fix: logger.error({ err }, 'message') - error object first, message second
      LOW    otel.no_shutdown             -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:6
             NodeSDK without shutdown(): buffered spans are lost on exit
             fix: process.on('SIGTERM', () => sdk.shutdown().finally(() => process.exit(0)))
      LOW    log.level_hardcoded          -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:9
             log level hard-coded to debug/trace
             fix: level: process.env.LOG_LEVEL ?? 'info'
      LOW    log.pretty_in_prod           -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:9
             pino-pretty transport without an environment check
             fix: enable it only when NODE_ENV === 'development'; production logs must stay JSON
      LOW    log.console                  -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:15
             2 console.* call(s) in server code
             fix: use the app logger (pino) so output is JSON with levels, request ids and redaction
      LOW    log.error_message_only       -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/nodejs-backend-skills/tests/fixtures/logging-and-tracing/noisy-app/src/server.js:26
             only the error message is logged (no stack, no cause)
             fix: pass the error object: logger.error(
    

    What you do next

    1. Fix the highest-severity items first.
    2. Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
    3. Keep the skill installed and re-run it whenever the project changes.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Observability for Node.js backends - structured JSON logging with pino / pino-http (levels, child loggers, error serialization, redaction of authorization, cookies, passwords and tokens), request ids reused from x-request-id and propagated with AsyncLocalStorage, and OpenTelemetry basics (NodeSDK loaded with --import before the app, OTLP exporter, sampling, custom spans, trace ids in logs, shutdown). Includes a checker for secrets and req.body in log calls, logger.error('msg', err) that pino drops, err.message-only logging, console.* in server code, hard-coded debug level, pino-pretty in production, missing redact config, missing request ids and late OpenTelemetry initialisation, plus logger.ts and instrumentation.mjs templates and a checklist.

    Who it's for

    Use when the user asks to add or fix logging, structured logs, request/correlation ids, tracing, OpenTelemetry, or to find why logs are missing errors or leak tokens.

    What's inside

    • Tested, offline Python script(s): check_logging.py (deterministic results, standard library only unless noted)
    • Reference guides: checklist.md, opentelemetry.md
    • Step-by-step agent instructions in SKILL.md covering: When to use; When not to use; Workflow

    Why it's worth it

    Generic prompts guess. This skill gives your agent a proven procedure plus scripts that check the facts, so you get the same correct answer every time, with exact fixes instead of vague advice. See the real demo below.

    Works with every major AI agent

    Built on the open SKILL.md standard: Claude Code, Codex CLI, Cursor, VS Code Copilot, Gemini CLI, Windsurf and 20+ other agents.

    Requirements

    • Python 3.8+ for the bundled scripts
    • No API keys, no account, runs locally

    Open source: saizul/nodejs-backend-skills on GitHub (MIT licence, by Saizul Amin).

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    Observability for Node.js backends - structured JSON logging with pino / pino-http (levels, child loggers, error serialization, redaction of authorization, cookies, passwords and tokens), request ids reused from x-request-id and propagated with AsyncLocalStorage, and OpenTelemetry basics (NodeSDK...

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use Node.js Structured Logging and Tracing Setup on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.