Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/go-gc-duration.yaml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
component: Go
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:
21 changes: 21 additions & 0 deletions docs/runtime/go-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -149,6 +150,25 @@ This metric is [recommended][MetricRecommended].
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Metric: `go.memory.gc.pause.duration`

This metric is [opt-in][MetricOptIn].

<!-- semconv metric.go.memory.gc.pause.duration -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| 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.

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Go goroutines

**Description:** Go metrics captured under the namespace `go.goroutine.*`
Expand Down Expand Up @@ -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
14 changes: 14 additions & 0 deletions model/go/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading