diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 47ad9f8ab347..eaa01eac75ea 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -43,6 +43,7 @@ * BanyanDB: support new Index rule type `SKIPPING/TREE`, and update the record `log`'s `trace_id` indexType to `SKIPPING` * BanyanDB: remove `index-only` from tag setting. * Fix analysis tracing profiling span failure in ES storage. +* Add UI dashboard for Ruby runtime metrics. #### UI diff --git a/docs/en/setup/service-agent/agent-compatibility.md b/docs/en/setup/service-agent/agent-compatibility.md index 1d0f00b53ebf..364d5eeb7ad2 100644 --- a/docs/en/setup/service-agent/agent-compatibility.md +++ b/docs/en/setup/service-agent/agent-compatibility.md @@ -4,15 +4,15 @@ SkyWalking 8.0+ uses v3 protocols. Agents don't have to keep the identical versi ## SkyWalking Native Agents -| OAP Server Version | Java | Python | NodeJS | LUA | Kong | Browser Agent | Rust | PHP | Go | Rover | Satellite | -|--------------------|-------------------------|-----------|-----------|-----|------|---------------|------|-----|------------|------------|------------| -| 8.0.1 - 8.1.0 | 8.0.0 - 8.3.0 | < = 0.6.0 | < = 0.3.0 | All | All | No | All | No | No | No | No | -| 8.2.0 - 8.3.0 | 8.0.0 - 8.3.0 | < = 0.6.0 | < = 0.3.0 | All | All | All | All | No | No | No | No | -| 8.4.0 - 8.8.1 | \> = 8.0.0 | All | All | All | All | All | All | All | No | No | No | -| 8.9.0+ | \> = 8.0.0 | All | All | All | All | All | All | All | No | No | \> = 0.4.0 | -| 9.0.0 | \> = 8.0.0 | All | All | All | All | All | All | All | No | No | \> = 0.4.0 | -| 9.1.0+ | \> = 8.0.0 | All | All | All | All | All | All | All | No | \> = 0.1.0 | \> = 1.0.0 | -| 9.5.0+ | \> = 8.0.0 & \> = 9.0.0 | All | All | All | All | All | All | All | \> = 0.1.0 | \> = 0.5.0 | \> = 1.2.0 | +| OAP Server Version | Java | Python | NodeJS | LUA | Kong | Browser Agent | Rust | PHP | Go | Rover | Satellite | Ruby | +|--------------------|-------------------------|-----------|-----------|-----|------|---------------|------|-----|------------|------------|------------|------------| +| 8.0.1 - 8.1.0 | 8.0.0 - 8.3.0 | < = 0.6.0 | < = 0.3.0 | All | All | No | All | No | No | No | No | No | +| 8.2.0 - 8.3.0 | 8.0.0 - 8.3.0 | < = 0.6.0 | < = 0.3.0 | All | All | All | All | No | No | No | No | No | +| 8.4.0 - 8.8.1 | \> = 8.0.0 | All | All | All | All | All | All | All | No | No | No | No | +| 8.9.0+ | \> = 8.0.0 | All | All | All | All | All | All | All | No | No | \> = 0.4.0 | No | +| 9.0.0 | \> = 8.0.0 | All | All | All | All | All | All | All | No | No | \> = 0.4.0 | No | +| 9.1.0+ | \> = 8.0.0 | All | All | All | All | All | All | All | No | \> = 0.1.0 | \> = 1.0.0 | No | +| 9.5.0+ | \> = 8.0.0 & \> = 9.0.0 | All | All | All | All | All | All | All | \> = 0.1.0 | \> = 0.5.0 | \> = 1.2.0 | \> = 0.1.0 | ## Ecosystem Agents diff --git a/docs/en/setup/service-agent/server-agents.md b/docs/en/setup/service-agent/server-agents.md index ed469faa9d9c..01a59479cc54 100644 --- a/docs/en/setup/service-agent/server-agents.md +++ b/docs/en/setup/service-agent/server-agents.md @@ -22,6 +22,8 @@ format and maximize the analysis capabilities of the SkyWalking OAP server. - [Go agent](https://skywalking.apache.org/docs/skywalking-go/next/readme/). Learn how to integrate the Go agent with a golang service. +- [Ruby agent](https://skywalking.apache.org/docs/skywalking-ruby/next/readme/). Learn how to integrate the Ruby agent with a ruby service. + The following agents and SDKs are compatible with SkyWalking's data formats and network protocols but are maintained by third parties. See their project repositories for guides and releases. diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml index 3db4859c80b2..30c7f4d2fa58 100644 --- a/oap-server/server-starter/src/main/resources/application.yml +++ b/oap-server/server-starter/src/main/resources/application.yml @@ -228,7 +228,7 @@ agent-analyzer: # Nginx and Envoy agents can't get the real remote address. # Exit spans with the component in the list would not generate the client-side instance relation metrics. noUpstreamRealAddressAgents: ${SW_NO_UPSTREAM_REAL_ADDRESS:6000,9000} - meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:datasource,threadpool,satellite,go-runtime,python-runtime,continuous-profiling,java-agent,go-agent} # Which files could be meter analyzed, files split by "," + meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:datasource,threadpool,satellite,go-runtime,python-runtime,continuous-profiling,java-agent,go-agent,ruby-runtime} # Which files could be meter analyzed, files split by "," slowCacheReadThreshold: ${SW_SLOW_CACHE_SLOW_READ_THRESHOLD:default:20,redis:10} # The slow cache read operation thresholds. Unit ms. slowCacheWriteThreshold: ${SW_SLOW_CACHE_SLOW_WRITE_THRESHOLD:default:20,redis:10} # The slow cache write operation thresholds. Unit ms. diff --git a/oap-server/server-starter/src/main/resources/meter-analyzer-config/ruby-runtime.yaml b/oap-server/server-starter/src/main/resources/meter-analyzer-config/ruby-runtime.yaml new file mode 100644 index 000000000000..4321b8271a93 --- /dev/null +++ b/oap-server/server-starter/src/main/resources/meter-analyzer-config/ruby-runtime.yaml @@ -0,0 +1,53 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +expSuffix: instance(['service'], ['instance'], Layer.GENERAL) +metricPrefix: meter +metricsRules: + # CPU Metrics + - name: instance_ruby_cpu_usage_percent + exp: instance_ruby_cpu_usage_percent + + # Memory Metrics + - name: instance_ruby_memory_rss_mb + exp: instance_ruby_memory_rss_mb + - name: instance_ruby_memory_usage_percent + exp: instance_ruby_memory_usage_percent + + # GC Metrics + - name: instance_ruby_gc_count_total + exp: instance_ruby_gc_count_total.increase("PT1M") + - name: instance_ruby_gc_minor_count_total + exp: instance_ruby_gc_minor_count_total.increase("PT1M") + - name: instance_ruby_gc_major_count_total + exp: instance_ruby_gc_major_count_total.increase("PT1M") + - name: instance_ruby_gc_time_total + exp: instance_ruby_gc_time_total.increase("PT1M") + - name: instance_ruby_heap_usage_percent + exp: instance_ruby_heap_usage_percent + + # Thread Metrics + - name: instance_ruby_thread_count_active + exp: instance_ruby_thread_count_active + - name: instance_ruby_thread_count_running + exp: instance_ruby_thread_count_running + + # Ruby runtime Metrics + - name: instance_ruby_total_allocated_objects + exp: instance_ruby_total_allocated_objects + - name: instance_ruby_heap_live_slots_count + exp: instance_ruby_heap_live_slots_count + - name: instance_ruby_heap_available_slots_count + exp: instance_ruby_heap_available_slots_count diff --git a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json index 45ab7eb51ff0..d804699da18e 100644 --- a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json +++ b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-instance.json @@ -1520,6 +1520,255 @@ ] } ] + }, + { + "name": "Ruby", + "children": [ + { + "x": 0, + "y": 0, + "w": 8, + "h": 13, + "i": "36", + "type": "Widget", + "widget": { + "title": "Ruby Process CPU Usage (%)", + "tips": "Process CPU utilization percentage." + }, + "graph": { + "type": "Area", + "opacity": 0.4, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "CPU Usage", + "unit": "%" + } + ], + "expressions": [ + "meter_instance_ruby_cpu_usage_percent" + ] + }, + { + "x": 8, + "y": 0, + "w": 8, + "h": 13, + "i": "37", + "type": "Widget", + "widget": { + "title": "Ruby Thread Status", + "tips": "Active threads: All alive threads including running, sleeping, and waiting. Running threads: Only threads currently executing code." + }, + "graph": { + "type": "Line", + "step": false, + "smooth": false, + "showSymbol": true, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "Active Threads", + "unit": "count" + }, + { + "label": "Running Threads", + "unit": "count" + } + ], + "expressions": [ + "meter_instance_ruby_thread_count_active", + "meter_instance_ruby_thread_count_running" + ] + }, + { + "x": 16, + "y": 0, + "w": 8, + "h": 13, + "i": "38", + "type": "Widget", + "widget": { + "title": "Ruby GC Count Per Minute", + "tips": "Total: All garbage collections. Minor: Quick collections of young objects. Major: Full heap collections including old objects." + }, + "graph": { + "type": "Bar", + "showBackground": true + }, + "metricConfig": [ + { + "label": "Total GC Count", + "unit": "count" + }, + { + "label": "Minor GC Count", + "unit": "count" + }, + { + "label": "Major GC Count", + "unit": "count" + } + ], + "expressions": [ + "meter_instance_ruby_gc_count_total", + "meter_instance_ruby_gc_minor_count_total", + "meter_instance_ruby_gc_major_count_total" + ] + }, + { + "x": 0, + "y": 13, + "w": 8, + "h": 13, + "i": "39", + "type": "Widget", + "widget": { + "title": "Ruby Memory (MB)", + "tips": "Resident Set Size (RSS): Total physical memory used by the Ruby process, including heap, stack, and shared libraries." + }, + "graph": { + "type": "Area", + "opacity": 0.4, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "RSS (MB)", + "unit": "MB" + } + ], + "expressions": [ + "meter_instance_ruby_memory_rss_mb" + ] + }, + { + "x": 8, + "y": 13, + "w": 8, + "h": 13, + "i": "40", + "type": "Widget", + "widget": { + "title": "Ruby Heap Usage (%)", + "tips": "Percentage of Ruby heap slots currently in use. High usage may trigger garbage collection." + }, + "graph": { + "type": "Line", + "step": false, + "smooth": false, + "showSymbol": true, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "Heap Usage", + "unit": "%" + } + ], + "expressions": [ + "meter_instance_ruby_heap_usage_percent" + ] + }, + { + "x": 16, + "y": 13, + "w": 8, + "h": 13, + "i": "41", + "type": "Widget", + "widget": { + "title": "Ruby Heap Slots", + "tips": "Live slots: Number of heap slots containing live objects. Available slots: Total heap slots available for object allocation." + }, + "graph": { + "type": "Line", + "step": false, + "smooth": false, + "showSymbol": true, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "Live Slots", + "unit": "count" + }, + { + "label": "Available Slots", + "unit": "count" + } + ], + "expressions": [ + "meter_instance_ruby_heap_live_slots_count", + "meter_instance_ruby_heap_available_slots_count" + ] + }, + { + "x": 0, + "y": 26, + "w": 8, + "h": 13, + "i": "42", + "type": "Widget", + "widget": { + "title": "Ruby Memory Usage (%)", + "tips": "Process memory usage as a percentage of total system memory." + }, + "graph": { + "type": "Line", + "step": false, + "smooth": false, + "showSymbol": true, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "Memory Usage", + "unit": "%" + } + ], + "expressions": [ + "meter_instance_ruby_memory_usage_percent" + ] + }, + { + "x": 8, + "y": 26, + "w": 8, + "h": 13, + "i": "43", + "type": "Widget", + "widget": { + "title": "Ruby GC Time (ms)", + "tips": "Cumulative garbage collection time in milliseconds." + }, + "graph": { + "type": "Line", + "step": false, + "smooth": false, + "showSymbol": true, + "showXAxis": true, + "showYAxis": true + }, + "metricConfig": [ + { + "label": "GC Time", + "unit": "ms" + } + ], + "expressions": [ + "meter_instance_ruby_gc_time_total" + ] + } + ] } ] },