Skip to content

Commit

Permalink
add go attributes to the attributes registry
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed May 21, 2024
1 parent 32e4ebe commit a708352
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ body:
- area:file
- area:gcp
- area:gen-ai
- area:go
- area:graphql
- area:heroku
- area:host
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ body:
- area:file
- area:gcp
- area:gen-ai
- area:go
- area:graphql
- area:heroku
- area:host
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ body:
- area:file
- area:gcp
- area:gen-ai
- area:go
- area:graphql
- area:heroku
- area:host
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Currently, the following namespaces exist:
- [File](file.md)
- [GCP](gcp.md)
- [Gen AI](gen-ai.md)
- [Go](go.md)
- [GraphQL](graphql.md)
- [Heroku](heroku.md)
- [Host](host.md)
Expand Down
22 changes: 22 additions & 0 deletions docs/attributes-registry/go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# Go

## Go Attributes

This document defines Go related attributes.

| Attribute | Type | Description | Examples | Stability |
| ---------------- | ------ | ------------------- | ---------------- | ---------------------------------------------------------------- |
| `go.memory.type` | string | The type of memory. | `stack`; `other` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`go.memory.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
| ------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `stack` | Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `other` | Memory used by the Go runtime, excluding other categories of memory usage. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
18 changes: 1 addition & 17 deletions model/metrics/go-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,8 @@ groups:
prefix: go.memory
unit: "By"
attributes:
- id: type
stability: experimental
type:
allow_custom_values: false
members:
- id: stack
value: 'stack'
brief: 'Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use.'
note: >
Computed from `/memory/classes/heap/stacks:bytes`.
stability: experimental
- id: other
value: 'other'
brief: 'Memory used by the Go runtime, excluding other categories of memory usage.'
stability: experimental
- ref: go.memory.type
requirement_level: recommended
brief: The type of memory.
examples: ["other", "stack"]
stability: experimental

- id: metric.go.memory.released
Expand Down
25 changes: 25 additions & 0 deletions model/registry/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
groups:
- id: registry.go
type: attribute_group
prefix: go
brief: >
This document defines Go related attributes.
attributes:
- id: memory.type
stability: experimental
type:
allow_custom_values: false
members:
- id: stack
value: 'stack'
brief: 'Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use.'
note: >
Computed from `/memory/classes/heap/stacks:bytes`.
stability: experimental
- id: other
value: 'other'
brief: 'Memory used by the Go runtime, excluding other categories of memory usage.'
stability: experimental
requirement_level: recommended
brief: The type of memory.
examples: ["other", "stack"]

0 comments on commit a708352

Please sign in to comment.