diff --git a/.chloggen/go-gc-duration.yaml b/.chloggen/go-gc-duration.yaml new file mode 100644 index 0000000000..d2d90f6cbd --- /dev/null +++ b/.chloggen/go-gc-duration.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: Go + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add opt-in go.memory.gc.pause.duration histogram metric. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [3353] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/runtime/go-metrics.md b/docs/runtime/go-metrics.md index a8b7d04398..0a85543416 100644 --- a/docs/runtime/go-metrics.md +++ b/docs/runtime/go-metrics.md @@ -18,6 +18,7 @@ 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.pause.duration`](#metric-gomemorygcpauseduration) - [Go goroutines](#go-goroutines) - [Metric: `go.goroutine.count`](#metric-gogoroutinecount) - [Go processor](#go-processor) @@ -149,6 +150,25 @@ This metric is [recommended][MetricRecommended]. +### Metric: `go.memory.gc.pause.duration` + +This metric is [opt-in][MetricOptIn]. + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | +| -------- | --------------- | ----------- | -------------- | --------- | ------ | +| `go.memory.gc.pause.duration` | Histogram | `s` | Distribution of individual GC-related stop-the-world pause latencies. This is the time from deciding to stop the world until the world is started again. [1] | ![Development](https://img.shields.io/badge/-development-blue) | | + +**[1]:** Computed from `/sched/pauses/total/gc:seconds`. Bucket boundaries are provided by the runtime, and are subject to change. + + + + + ## Go goroutines **Description:** Go metrics captured under the namespace `go.goroutine.*` @@ -244,3 +264,4 @@ This metric is [recommended][MetricRecommended]. [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status [MetricRecommended]: /docs/general/metric-requirement-level.md#recommended [RuntimeMetrics]: https://pkg.go.dev/runtime/metrics +[MetricOptIn]: /docs/general/metric-requirement-level.md#opt-in diff --git a/model/go/metrics.yaml b/model/go/metrics.yaml index 83839d35d1..38f08f63da 100644 --- a/model/go/metrics.yaml +++ b/model/go/metrics.yaml @@ -68,6 +68,20 @@ groups: unit: "By" stability: development + - id: metric.go.memory.gc.pause.duration + type: metric + metric_name: go.memory.gc.pause.duration + annotations: + code_generation: + metric_value_type: double + brief: "Distribution of individual GC-related stop-the-world pause latencies. This is the time from deciding to stop the world until the world is started again." + note: > + Computed from `/sched/pauses/total/gc:seconds`. + Bucket boundaries are provided by the runtime, and are subject to change. + instrument: histogram + unit: "s" + stability: development + - id: metric.go.goroutine.count type: metric metric_name: go.goroutine.count