selfmonitor

Enforce self-monitoring code quality for C++ and Go components.

2.2k|444|Updated Nov 8, 2021
One-click install
npx skills add https://github.com/alibaba/loongcollector --skill selfmonitor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: selfmonitor
Source: https://github.com/alibaba/loongcollector/tree/main/.cursor/skills/selfmonitor
Command: npx skills add https://github.com/alibaba/loongcollector --skill selfmonitor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LoongCollector's codebase often misuses self-monitoring constructs, leading to inconsistent metrics, alerting patterns, and brittle implementations. This Skill provides a standardized guide to enforce correct self-monitoring usage, focusing on metrics, alarms, coding style, and implementation logic across the project.

Core Features & Use Cases

  • Metric naming and unit conventions: Ensure metric prefixes, names, and units follow a single, consistent schema to enable reliable monitoring and aggregation.
  • Alarm usage and messaging guidelines: Standardize alarm types, severities, and descriptive messages to reduce noise and improve operability.
  • Code quality and guardrails: Promote safe patterns for metric creation, error handling, and dependency management across C++ and Go components.
  • Review and deployment guidance: Provide a concrete checklist for developers, reviewers, and CI pipelines to verify adherence before merge.

Quick Start

Run the selfmonitor checks across the repository to enforce the self-monitoring guidelines.

Frequently Asked Questions about selfmonitor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent metric naming conventions in C++ and Go codebases?

To enforce consistent metric naming conventions, validate metric prefixes, names, and units against a single standardized schema. This ensures reliable monitoring and aggregation across C++ and Go components during code reviews and CI checks.

What is the best way to standardize alarm usage and severities across LoongCollector components?

Standardizing alarm usage involves validating alarm types, severities, and descriptive messages to reduce noise. This creates a consistent alerting pattern that improves operability across C++ and Go implementations.

Can I use automated CI checks to validate self-monitoring code quality?

Yes, you can use automated CI checks to validate self-monitoring code quality. The process provides a concrete checklist for CI pipelines to verify adherence to metric, alarm, and coding guardrails before code merge.

What code quality guardrails are needed for safe metric creation and error handling?

Code quality guardrails for metric creation require safe patterns for error handling and dependency management. Promoting these patterns prevents brittle implementations and ensures robust self-monitoring across the project.

Why does inconsistent self-monitoring code lead to brittle implementations in LoongCollector?

Inconsistent self-monitoring code leads to brittle implementations because of misused metrics and alerting patterns. Standardizing these constructs prevents unreliable monitoring and ensures safe code behavior across components.