RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

    • AOP Overview
    • Before Advice
    • After Advice
    • Around Advice
    • Start Advice
    • End Advice
    • Completed Advice
    • OnChainBeforeInit Advice
    • OnNodeBeforeInit 增强点
    • OnCreated Advice
    • OnReload Advice
    • OnDestroy Advice
    • builtin aspect

      • Debug Aspect
      • Fallback Aspect
      • Metrics Aspect
      • Concurrency Limiter Aspect
      • RuleChain Validator Aspect
  • Trigger

  • Advanced Topic

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

Metrics Aspect

Metrics Aspect: Metrics Aspect for statistical analysis. The rule engine instance statistics for the following metrics:

  • Current: The number of processes currently being handled by the rule engine
  • Total: The total number of processes completed by the rule engine
  • Failed: The total number of rule branch chains that failed to execute in the rule engine
  • Success: The total number of rule branch chains that successfully executed in the rule engine

To obtain the metrics data of the rule engine, use the following method:

ruleEngine, ok := rulego.Get("rule01")
metrics := ruleEngine.GetMetrics()
if metrics != nil {
    fmt.Println(metrics)
}
1
2
3
4
5

Reset the metrics data:

ruleEngine, ok := rulego.Get("rule01")
metrics := ruleEngine.GetMetrics()
if metrics != nil {
    metrics.Reset()
}
1
2
3
4
5

TIP

This aspect will be automatically imported and does not require manual introduction.

Edit this page on GitHub (opens new window)
Last Updated: 2025/05/16, 02:05:35
Fallback Aspect
Concurrency Limiter Aspect

← Fallback Aspect Concurrency Limiter Aspect→

Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式