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

    • Extension Components Overview
    • filter

    • transform

    • external

      • redisClient
      • kafkaProducer
      • natsClient
      • rabbitmqClient
      • opengeminiWrite
      • opengeminiQuery
      • MongoDB Client
      • Redis Publisher
      • grpcClient
      • OpenTelemetry
        • Configuration
          • MetricConfig Metric Configuration
        • Metric Type Description
        • Configuration Example
      • BeanstalkdWorker
      • BeanstalkdTube
      • WukongimSender
    • ai

    • ci

    • IoT

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

目录

OpenTelemetry

x/otel component: v0.28.0+ OpenTelemetry client component, used for recording various metric data and sending it to backend systems (such as: Prometheus, Datadog, InfluxDB, etc.) via the OTLP protocol.

Requires additional import of the extension library: rulego-components (opens new window)

# Configuration

Field Type Description Default Value
server string Address of the OTLP backend system localhost:4318
protocol string Transport protocol, supports grpc and http http
metricExpr string Dynamic metric configuration expression, supports fetching metric configuration from message payload ${msg.metrics}
metrics MetricConfig[] Static metric configuration list None

# MetricConfig Metric Configuration

Field Type Description Example Value
metricName string Metric name http_requests
description string Metric description HTTP request count
unit string Metric unit (e.g., 1, s, ms, B, %, etc.) 1
opType string Operation type: COUNTER, GAUGE, HISTOGRAM COUNTER
value string Metric value expression, supports dynamic value fetching ${msg.value}
labels string Label expression, supports dynamic value fetching, in JSON object format ${msg.labels}

# Metric Type Description

  • COUNTER: Counter, a cumulative value that only increases (e.g., total number of requests)
  • GAUGE: Gauge, an instantaneous value that can increase or decrease (e.g., CPU usage rate)
  • HISTOGRAM: Histogram, used for statistical distribution of values (e.g., request latency distribution)

# Configuration Example

{
  "id": "otel1",
  "type": "x/otel",
  "configuration": {
    "server": "localhost:4317",
    "protocol": "grpc",
    "metricExpr": "${msg.metrics}",
    "metrics": [
      {
        "metricName": "http_requests",
        "description": "HTTP requests made",
        "unit": "1",
        "opType": "COUNTER",
        "value": "${msg.value}",
        "labels": "${msg.labels}"
      }
    ]
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Edit this page on GitHub (opens new window)
Last Updated: 2025/04/02, 01:29:50
grpcClient
BeanstalkdWorker

← grpcClient BeanstalkdWorker→

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

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