From c24db684f8b641eab5a6d74e9c73824d939a020f Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Wed, 1 May 2024 18:16:58 +0000 Subject: [PATCH] change user_goal to go.config.gogc --- docs/runtime/go-metrics.md | 37 ++++++++++++++++++++--------------- model/metrics/go-metrics.yaml | 22 ++++++++++----------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/docs/runtime/go-metrics.md b/docs/runtime/go-metrics.md index b4c4d00827..1498d0beec 100644 --- a/docs/runtime/go-metrics.md +++ b/docs/runtime/go-metrics.md @@ -21,13 +21,14 @@ These metrics are obtained from Go's [`runtime/metrics`][RuntimeMetrics] package - [Metric: `go.memory.allocations`](#metric-gomemoryallocations) - [Go Garbage Collection](#go-garbage-collection) - [Metric: `go.memory.gc.goal`](#metric-gomemorygcgoal) - - [Metric: `go.memory.gc.user_goal`](#metric-gomemorygcuser_goal) - [Go Goroutines](#go-goroutines) - [Metric: `go.goroutine.count`](#metric-gogoroutinecount) - [Go Threads](#go-threads) - [Metric: `go.thread.limit`](#metric-gothreadlimit) - [Go Scheduler](#go-scheduler) - [Metric: `go.schedule.duration`](#metric-goscheduleduration) +- [Go Runtime Configuration](#go-runtime-configuration) + - [Metric: `go.config.gogc`](#metric-goconfiggogc) @@ -141,21 +142,6 @@ This metric is [recommended][MetricRecommended]. -### Metric: `go.memory.gc.user_goal` - -This metric is [recommended][MetricRecommended]. - - -| Name | Instrument Type | Unit (UCUM) | Description | Stability | -| -------- | --------------- | ----------- | -------------- | --------- | -| `go.memory.gc.user_goal` | UpDownCounter | `1` | Heap size target ratio for the end of the GC cycle, as configured by the user. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - -**[1]:** The value range is [0.0,1.0]. Computed from `/gc/gogc:percent`. - - - - - ## Go Goroutines **Description:** Go metrics captured under the namespace `go.goroutine.*` @@ -213,6 +199,25 @@ This metric is [recommended][MetricRecommended]. +## Go Runtime Configuration + +**Description:** Go metrics captured under the namespace `go.config.*` + +### Metric: `go.config.gogc` + +This metric is [recommended][MetricRecommended]. + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `go.config.gogc` | UpDownCounter | `%` | Heap size target percentage configured by the user, otherwise 100. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** The value range is [0.0,100.0]. Computed from `/gc/gogc:percent`. + + + + + [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md [MetricRecommended]: /docs/general/metric-requirement-level.md#recommended [RuntimeMetrics]: https://pkg.go.dev/runtime/metrics diff --git a/model/metrics/go-metrics.yaml b/model/metrics/go-metrics.yaml index 6f30f762d7..74424f0b6d 100644 --- a/model/metrics/go-metrics.yaml +++ b/model/metrics/go-metrics.yaml @@ -80,17 +80,6 @@ groups: unit: "By" stability: experimental - - id: metric.go.memory.gc.user_goal - type: metric - metric_name: go.memory.gc.user_goal - brief: "Heap size target ratio for the end of the GC cycle, as configured by the user." - instrument: updowncounter - unit: "1" - note: > - The value range is [0.0,1.0]. - Computed from `/gc/gogc:percent`. - stability: experimental - - id: metric.go.goroutine.count type: metric metric_name: go.goroutine.count @@ -120,3 +109,14 @@ groups: instrument: histogram unit: "s" stability: experimental + + - id: metric.go.config.gogc + type: metric + metric_name: go.config.gogc + brief: "Heap size target percentage configured by the user, otherwise 100." + note: > + The value range is [0.0,100.0]. + Computed from `/gc/gogc:percent`. + instrument: updowncounter + unit: "%" + stability: experimental