Skip to content

Commit

Permalink
rename gc.target -> gc.goal
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed May 21, 2024
1 parent 16d3a0a commit bde0f9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions docs/runtime/go-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ This document describes semantic conventions for Go runtime metrics in OpenTelem
- [Metric: `go.memory.allocated`](#metric-gomemoryallocated)
- [Metric: `go.memory.allocations`](#metric-gomemoryallocations)
- [Go Garbage Collection](#go-garbage-collection)
- [Metric: `go.memory.gc.target`](#metric-gomemorygctarget)
- [Metric: `go.memory.gc.user_target`](#metric-gomemorygcuser_target)
- [Metric: `go.memory.gc.goal`](#metric-gomemorygcgoal)
- [Metric: `go.memory.gc.user_goal`](#metric-gomemorygcuser_goal)
- [Go Threads](#go-threads)
- [Metric: `go.thread.limit`](#metric-gothreadlimit)
- [Go Scheduler](#go-scheduler)
Expand Down Expand Up @@ -102,34 +102,34 @@ This metric is obtained from Go's [`runtime/metrics`][RuntimeMetrics] package us

**Description:** Go metrics captured under the namespace `go.memory.gc.*`

### Metric: `go.memory.gc.target`
### Metric: `go.memory.gc.goal`

This metric is [recommended][MetricRecommended].
This metric is obtained from Go's [`runtime/metrics`][RuntimeMetrics] package using `/gc/heap/goal:bytes`.

<!-- semconv metric.go.memory.gc.target(metric_table) -->
<!-- semconv metric.go.memory.gc.goal(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `go.memory.gc.target` | UpDownCounter | `By` | Heap size target for the end of the GC cycle. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `go.memory.gc.goal` | UpDownCounter | `By` | Heap size target for the end of the GC cycle. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.go.memory.gc.target(full) -->
<!-- semconv metric.go.memory.gc.goal(full) -->
<!-- endsemconv -->

### Metric: `go.memory.gc.user_target`
### Metric: `go.memory.gc.user_goal`

This metric is [recommended][MetricRecommended].
This metric is obtained from Go's [`runtime/metrics`][RuntimeMetrics] package using `/gc/gogc:percent`.

<!-- semconv metric.go.memory.gc.user_target(metric_table) -->
<!-- semconv metric.go.memory.gc.user_goal(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `go.memory.gc.user_target` | 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) |
| `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].
<!-- endsemconv -->

<!-- semconv metric.go.memory.gc.user_target(full) -->
<!-- semconv metric.go.memory.gc.user_goal(full) -->
<!-- endsemconv -->

## Go Threads
Expand Down
8 changes: 4 additions & 4 deletions model/metrics/go-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ groups:
unit: "{allocation}"
stability: experimental

- id: metric.go.memory.gc.target
- id: metric.go.memory.gc.goal
type: metric
metric_name: go.memory.gc.target
metric_name: go.memory.gc.goal
brief: "Heap size target for the end of the GC cycle."
instrument: updowncounter
unit: "By"
stability: experimental

- id: metric.go.memory.gc.user_target
- id: metric.go.memory.gc.user_goal
type: metric
metric_name: go.memory.gc.user_target
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"
Expand Down

0 comments on commit bde0f9b

Please sign in to comment.