signoz

SigNoz 是一个基于 OpenTelemetry 的开源可观测性平台,整合日志、指标和链路追踪。适合希望获得类似 Datadog 可视化效果但使用自托管部署、参考第一方文档并依赖活跃上游维护的场景。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "signoz":https://skillpi.com/zh/skills/deepskill-1d7972fd142014c05e7f8c0951789759cf51637f41dc60ddb27a13e24e5501e0。安装前核对上游来源和版本:https://skillhub.cn/skills/user_3c6cb52e/signoz-open-source-observability-platform。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

SigNoz 是一个基于 OpenTelemetry 的开源可观测性平台,整合日志、指标和链路追踪。适合希望获得类似 Datadog 可视化效果但使用自托管部署、参考第一方文档并依赖活跃上游维护的场景。

0 下载

介绍来源: third_party · user_3c6cb52e · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: signoz
description: Expert guidance for SigNoz, the open-source observability platform that provides traces, metrics, and logs in a single UI. Built natively on OpenTelemetry, SigNoz is a self-hosted alternative to Datadog and New Relic. Helps developers set up distributed tracing, application performance monitoring, log management, and custom dashboards.
license: Apache-2.0
compatibility: No special requirements
metadata:
  author: terminal-skills
  version: 1.0.0
  category: devops
  tags:
  - observability
  - apm
  - traces
  - metrics
  - logs

SigNoz — Open-Source Observability Platform

Overview

SigNoz, the open-source observability platform that provides traces, metrics, and logs in a single UI. Built natively on OpenTelemetry, SigNoz is a self-hosted alternative to Datadog and New Relic. Helps developers set up distributed tracing, application performance monitoring, log management, and custom dashboards.

Instructions

Deployment

# Docker Compose (quickstart)
git clone -b main https://github.com/SigNoz/signoz.git
cd signoz/deploy
docker compose -f docker/clickhouse-setup/docker-compose.yaml up -d

# SigNoz UI at http://localhost:3301
# OTel Collector at localhost:4317 (gRPC) / localhost:4318 (HTTP)

Instrument a Node.js Application

// tracing.ts — OpenTelemetry auto-instrumentation for SigNoz
// Import this file BEFORE any other imports in your app entry point.

import { NodeSDK } from "@opentelemetry/sdk-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
import { Resource } from "@opentelemetry/resources";
import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from "@opentelemetry/semantic-conventions";

const sdk = new NodeSDK({
  resource: new Resource({
    [ATTR_SERVICE_NAME]: "api-gateway",
    [ATTR_SERVICE_VERSION]: "1.4.2",
    "deployment.environment": process.env.NODE_ENV ?? "development",
  }),
  traceExporter: new OTLPTraceExporter({
    url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? "http://localhost:4318/v1/traces",
  }),
  metricReader: new PeriodicExportingMetricReader({
    exporter: new OTLPMetricExporter({
      url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? "http://localhost:4318/v1/metrics",
    }),
    exportIntervalMillis: 30000,       // Export metrics every 30s
  }),
  instrumentations: [
    getNodeAutoInstrumentations({
      // Auto-instruments: HTTP, Express, pg, mysql, redis, MongoDB, gRPC
      "@opentelemetry/instrumentation-fs": { enabled: false },  // Too noisy
    }),
  ],
});

sdk.start();

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

Custom Spans and Attributes

// src/services/order-service.ts — Add business context to traces
import { trace, SpanStatusCode, context } from "@opentelemetry/api";

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

async function processOrder(orderId: string, userId: string) {
  // Create a span for the entire order processing
  return tracer.startActiveSpan("process-order", async (span) => {
    // Add business attributes — visible in SigNoz trace details
    span.setAttribute("order.id", orderId);
    span.setAttribute("user.id", userId);

    try {
      // Child span for payment
      const paymentResult = await tracer.startActiveSpan("charge-payment", async (paymentSpan) => {
        paymentSpan.setAttribute("payment.method", "stripe");
        const result = await stripe.charges.create({ amount: order.total, currency: "usd" });
        paymentSpan.setAttribute("payment.charge_id", result.id);
        paymentSpan.end();
        return result;
      });

      // Child span for inventory
      await tracer.startActiveSpan("update-inventory", async (inventorySpan) => {
        inventorySpan.setAttribute("items.count", order.items.length);
        await inventoryService.reserve(order.items);
        inventorySpan.end();
      });

      // Child span for notification
      await tracer.startActiveSpan("send-confirmation", async (notifSpan) => {
        await emailService.sendOrderConfirmation(userId, orderId);
        notifSpan.end();
      });

      span.setAttribute("order.status", "completed");
      span.setStatus({ code: SpanStatusCode.OK });
    } catch (error) {
      span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
      span.recordException(error);
      throw error;
    } finally {
      span.end();
    }
  });
}

Custom Metrics

// src/metrics/business-metrics.ts — Track business KPIs in SigNoz
import { metrics } from "@opentelemetry/api";

const meter = metrics.getMeter("business-metrics");

// Counter — total orders processed
const ordersProcessed = meter.createCounter("orders.processed", {
  description: "Total number of orders processed",
  unit: "orders",
});

// Histogram — order value distribution
const orderValue = meter.createHistogram("orders.value", {
  description: "Order value in cents",
  unit: "cents",
});

// Up/down counter — active users
const activeUsers = meter.createUpDownCounter("users.active", {
  description: "Currently active users",
});

// Usage
function onOrderCompleted(order: Order) {
  ordersProcessed.add(1, {
    "order.plan": order.plan,
    "order.region": order.region,
  });
  orderValue.record(order.totalCents, {
    "order.plan": order.plan,
  });
}

Structured Logging

// src/lib/logger.ts — Logs that correlate with traces in SigNoz
import pino from "pino";
import { context, trace } from "@opentelemetry/api";

const logger = pino({
  mixin() {
    // Inject trace context into every log line
    // SigNoz correlates logs with traces using these fields
    const span = trace.getSpan(context.active());
    if (span) {
      const spanContext = span.spanContext();
      return {
        trace_id: spanContext.traceId,
        span_id: spanContext.spanId,
        trace_flags: `0${spanContext.traceFlags.toString(16)}`,
      };
    }
    return {};
  },
  transport: {
    target: "pino-opentelemetry-transport",
    options: {
      resourceAttributes: { "service.name": "api-gateway" },
      logRecordProcessorOptions: [{
        exporterOptions: {
          protocol: "http",
          httpExporterPath: "/v1/logs",
          hostname: "localhost",
          port: 4318,
        },
      }],
    },
  },
});

export default logger;

Alerts

# SigNoz supports alerting on any metric or trace-based condition.
# Configure via the SigNoz UI under Settings → Alerts

# Example alert rules:
# 1. P99 latency > 2s on /api/checkout endpoint
# 2. Error rate > 5% on any service in the last 5 minutes
# 3. Orders processed = 0 for 10 minutes (business metric)
# 4. CPU usage > 80% for 5 minutes

# Notification channels: Slack, PagerDuty, webhook, email, MS Teams, Opsgenie

Installation

# Self-hosted (Docker Compose)
git clone https://github.com/SigNoz/signoz.git
cd signoz/deploy && docker compose up -d

# Helm (Kubernetes)
helm repo add signoz https://charts.signoz.io
helm install signoz signoz/signoz -n observability --create-namespace

# SigNoz Cloud (managed)
# https://signoz.io/teams/

# Client instrumentation
npm install @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node
npm install @opentelemetry/exporter-trace-otlp-http @opentelemetry/exporter-metrics-otlp-http

Examples

Example 1: Setting up Signoz for a microservices project

User request:

I have a Node.js API and a React frontend running in Docker. Set up Signoz for monitoring/deployment.

The agent creates the necessary configuration files based on patterns like # Docker Compose (quickstart), sets up the integration with the existing Docker setup, configures appropriate defaults for a Node.js + React stack, and provides verification commands to confirm everything is working.

Example 2: Troubleshooting instrument a node.js application issues

User request:

Signoz is showing errors in our instrument a node.js application. Here are the logs: [error output]

The agent analyzes the error output, identifies the root cause by cross-referencing with common Signoz issues, applies the fix (updating configuration, adjusting resource limits, or correcting syntax), and verifies the resolution with appropriate health checks.

Guidelines

  1. OpenTelemetry native — SigNoz uses OTel as the standard; instrument with OTel SDKs and switch between SigNoz/Datadog/Jaeger without code changes
  2. Auto-instrumentation first — Start with auto-instrumentation packages; add custom spans only for business-critical paths
  3. Correlate logs, traces, metrics — Inject trace_id into logs; SigNoz links them together in the UI for root cause analysis
  4. Business metrics — Track revenue, orders, signups as OTel metrics; monitor them alongside infrastructure metrics
  5. Tail-based sampling — For high-traffic services, configure tail-based sampling in the OTel Collector to keep errors and slow traces
  6. ClickHouse storage — SigNoz uses ClickHouse for storage; tune retention policies based on your data volume
  7. Dashboard per service — Create a SigNoz dashboard for each service with RED metrics (Rate, Errors, Duration)
  8. Self-host for cost — SigNoz on your infrastructure costs 5-10x less than Datadog/New Relic for the same data volume

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • SigNoz 提供完整的开源可观测性解决方案,覆盖日志、指标、链路追踪三大核心能力
  • 作为 Datadog/New Relic 的自托管替代方案,具有显著的成本优势和 OpenTelemetry 原生支持
触发精准95/100

亮点

  • 触发描述精准覆盖核心功能:traces, metrics, logs, OpenTelemetry, self-hosted
  • 边界清晰,明确区分于商业 SaaS 产品,不易与其他监控工具混淆
结构规范98/100

待提升项

  • description 内容重复 原报告严重程度:轻微

    顶层 frontmatter 和 skill_body 均包含完整 description,存在冗余

    改进建议:建议移除 skill_body 中的重复 description,保持单一数据源

亮点

  • 结构清晰:Deployment → Instrumentation → Custom Spans → Metrics → Logging → Alerts 完整闭环
  • 提供端到端示例(微服务部署、问题排查),frontmatter 元数据完整规范
执行可靠90/100

亮点

  • 工具来源明确(官方 GitHub、npm 包),参数配置准确(端口、URL、环境变量)
  • 代码示例包含异常处理(try/catch、graceful shutdown)和最佳实践(auto-instrumentation first)
证据可验 (前四项均值)94/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

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

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 243, 244 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • charts.signoz.io
  • github.com
  • localhost
  • signoz.io

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。