monitoringobservability

Skill for MonitoringObservability, designed to help an AI Agent efficiently perform tasks related to monitoring and observability.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "monitoringobservability" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-534cd4b67b36c9005ad9c80d6d67a46b9255730c15847922d9f86601d5ec5e1e. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/monitoring-observability-8g6d before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Skill for MonitoringObservability, designed to help an AI Agent efficiently perform tasks related to monitoring and observability.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Tasks
const sdk = new NodeSDK({ serviceName: "order-service", traceExporter: new OTLPTraceExporter({ url: "http://otel-collector:4318/v1/traces", }), metricReader: new PeriodicExportingMetricReader({ exporter: new OTLPMetricExporter({ url: "http://otel-collector:4318/v1/metrics", }), exportIntervalMillis: 15000, }), instrumentations: [ new HttpInstrumentation(), new PgInstrumentation(), ], });
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: Monitoringobservability
slug: monitoring-observability
version: 1.0.0
displayName: Monitoringobservability
description: >
  MonitoringObservability专用技能,帮助AI Agent高效完成相关任务。
summary: "MonitoringObservability专用技能,帮助AI Agent高效完成相关任务。"
license: MIT
category: 开发者工具
framework:
  - Claude Code
  - Codex
  - Hermes Agent
  - OpenClaw
  - QClaw
  - WorkBuddy
platform: multi-platform
homepage: "https://github.com/1991513ccie-png"
repository: "https://github.com/1991513ccie-png"

Monitoring & Observability

OpenTelemetry Setup

import { NodeSDK } from "@opentelemetry/sdk-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
import { PgInstrumentation } from "@opentelemetry/instrumentation-pg";
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";

const sdk = new NodeSDK({
  serviceName: "order-service",
  traceExporter: new OTLPTraceExporter({
    url: "http://otel-collector:4318/v1/traces",
  }),
  metricReader: new PeriodicExportingMetricReader({
    exporter: new OTLPMetricExporter({
      url: "http://otel-collector:4318/v1/metrics",
    }),
    exportIntervalMillis: 15000,
  }),
  instrumentations: [
    new HttpInstrumentation(),
    new PgInstrumentation(),
  ],
});

sdk.start();
process.on("SIGTERM", () => sdk.shutdown());

Custom Spans and Metrics

import { trace, metrics, SpanStatusCode } from "@opentelemetry/api";

const tracer = trace.getTracer("order-service");
const meter = metrics.getMeter("order-service");

const orderCounter = meter.createCounter("orders.created", {
  description: "Number of orders created",
});

const orderDuration = meter.createHistogram("orders.processing_duration_ms", {
  description: "Order processing duration in milliseconds",
  unit: "ms",
});

async function createOrder(input: CreateOrderInput) {
  return tracer.startActiveSpan("createOrder", async (span) => {
    try {
      span.setAttributes({
        "order.customer_id": input.customerId,
        "order.item_count": input.items.length,
      });

      const start = performance.now();
      const order = await db.order.create({ data: input });

      orderCounter.add(1, { status: "success" });
      orderDuration.record(performance.now() - start);

      span.setStatus({ code: SpanStatusCode.OK });
      return order;
    } catch (error) {
      span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
      orderCounter.add(1, { status: "error" });
      throw error;
    } finally {
      span.end();
    }
  });
}

Prometheus Metrics

# prometheus.yml
global:
  scrape_interval: 15s

scrape_configs:
  - job_name: "api-servers"
    static_configs:
      - targets: ["api-1:9090", "api-2:9090"]
    metrics_path: /metrics

  - job_name: "node-exporter"
    static_configs:
      - targets: ["node-exporter:9100"]
import { collectDefaultMetrics, Counter, Histogram, Registry } from "prom-client";

const registry = new Registry();
collectDefaultMetrics({ register: registry });

const httpRequestDuration = new Histogram({
  name: "http_request_duration_seconds",
  help: "HTTP request duration in seconds",
  labelNames: ["method", "route", "status"],
  buckets: [0.01, 0.05, 0.1, 0.5, 1, 5],
  registers: [registry],
});

app.use((req, res, next) => {
  const end = httpRequestDuration.startTimer();
  res.on("finish", () => {
    end({ method: req.method, route: req.route?.path ?? req.path, status: res.statusCode });
  });
  next();
});

app.get("/metrics", async (req, res) => {
  res.set("Content-Type", registry.contentType);
  res.end(await registry.metrics());
});

Structured Logging

import pino from "pino";

const logger = pino({
  level: process.env.LOG_LEVEL ?? "info",
  formatters: {
    level: (label) => ({ level: label }),
  },
  redact: ["req.headers.authorization", "password", "token"],
});

function requestLogger(req, res, next) {
  const start = Date.now();
  res.on("finish", () => {
    logger.info({
      method: req.method,
      url: req.url,
      status: res.statusCode,
      duration_ms: Date.now() - start,
      trace_id: req.headers["x-trace-id"],
    });
  });
  next();
}

Alerting Rules

groups:
  - name: api-alerts
    rules:
      - alert: HighErrorRate
        expr: rate(http_request_duration_seconds_count{status=~"5.."}[5m]) / rate(http_request_duration_seconds_count[5m]) > 0.05
        for: 5m
        labels:
          severity: critical
        annotations:
          summary: "Error rate above 5% for {{ $labels.route }}"

      - alert: HighLatency
        expr: histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m])) > 2
        for: 10m
        labels:
          severity: warning

Anti-Patterns

  • Logging sensitive data (passwords, tokens, PII) without redaction
  • Using string interpolation in log messages instead of structured fields
  • Creating unbounded cardinality in metric labels (e.g., user IDs as labels)
  • Not correlating logs and traces with a shared trace ID
  • Alerting on symptoms (high CPU) without understanding root cause
  • Missing SLO definitions before building dashboards

Checklist

  • [ ] OpenTelemetry SDK initialized with auto-instrumentation for HTTP, DB, and messaging
  • [ ] Custom spans added for business-critical operations
  • [ ] Metrics use bounded label cardinality
  • [ ] Structured logging with JSON output and secret redaction
  • [ ] Trace context propagated across service boundaries
  • [ ] Alerting rules based on SLOs (error rate, latency percentiles)
  • [ ] Dashboards show RED metrics (Rate, Errors, Duration) per service
  • [ ] Log retention and rotation policies configured

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供 OpenTelemetry、Prometheus、结构化日志等监控与可观测性核心技术的详细实现方案
  • 包含最佳实践、反模式清单和检查清单,实用性强
Trigger Precision40/100

Areas to improve

  • description内容笼统,缺乏精准触发词 Reported severity: Major

    description 字段仅描述 'MonitoringObservability专用技能',未明确说明具体触发场景、用户意图或核心功能,导致触发边界不清晰,容易与其他开发者工具类 Skill 重叠。

    Recommendation: 建议补充具体的触发场景描述,例如:'当用户需要配置 OpenTelemetry 追踪、设置 Prometheus 指标监控、实现结构化日志或定义告警规则时触发',并细化核心功能点。

Structure and Standards75/100

Areas to improve

  • 缺少When to Use/示例章节 Reported severity: Minor

    Skill 内容结构良好,包含多个技术实现章节,但缺少明确的 'When to Use' 使用场景说明和端到端的完整使用示例,不利于用户快速理解何时以及如何使用该 Skill。

    Recommendation: 建议在文档开头或 frontmatter 后增加 'When to Use' 章节,说明适用场景(如:'适用于需要在 Node.js 服务中集成 OpenTelemetry 追踪、配置 Prometheus 指标监控等'),并提供一个端到端的简单示例流程。

Highlights

  • 文档结构清晰,分章节详述 OpenTelemetry、Prometheus、结构化日志等关键技术点
  • frontmatter 完整,包含 name、slug、version、displayName、description、license、category、framework、platform、homepage、repository 等必要信息
Execution Reliability70/100

Areas to improve

  • 代码示例缺少异常处理说明 Reported severity: Minor

    提供的 TypeScript 和 YAML 代码示例参数正确,但未对执行过程中可能出现的异常(如网络连接失败、依赖包缺失、配置错误等)进行说明或提供处理建议,也未提及不可逆操作的确认机制。

    Recommendation: 建议在代码示例后增加 '注意事项' 或 '异常处理' 说明,提醒用户在执行前确保依赖已安装、网络可达,并对关键配置进行验证。

Highlights

  • 工具来源明确,使用了 @opentelemetry、prom-client、pino 等主流开源库
  • 代码示例参数合理,覆盖了 HTTP 请求追踪、数据库操作、指标记录、日志记录等常见场景
Evidence Verifiability (mean of the first four)68/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com
  • otel-collector

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.