Skip to content

Commit b883922

Browse files
authored
pprof: add profile attribute (#3078)
Signed-off-by: Florian Lehner <[email protected]>
1 parent 502202e commit b883922

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

.chloggen/pprof-profile.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: 'enhancement'
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: pprof
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: add various pprof attributes to support lossless conversion from and to OTel profiles.
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [3078]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/general/profiles.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ They may be used in any Profiles record they apply to.
8181
| [`pprof.mapping.has_inline_frames`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | boolean | Indicates that there are inline frames related to this mapping. | |
8282
| [`pprof.mapping.has_line_numbers`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | boolean | Indicates that there are line numbers related to this mapping. | |
8383
| [`pprof.profile.comment`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string[] | Free-form text associated with the profile. This field should not be used to store any machine-readable information, it is only for human-friendly content. | `["hello world", "bazinga"]` |
84+
| [`pprof.profile.doc_url`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Documentation link for this profile type. [1] | `http://pprof.example.com/cpu-profile.html` |
85+
| [`pprof.profile.drop_frames`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors. | `/foobar/` |
86+
| [`pprof.profile.keep_frames`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. | `/bazinga/` |
87+
88+
**[1] `pprof.profile.doc_url`:** The URL must be absolute and may be missing if the profile was generated by code that did not supply a link
8489

8590
<!-- prettier-ignore-end -->
8691
<!-- END AUTOGENERATED TEXT -->

docs/registry/attributes/pprof.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ Attributes specific to pprof that help convert from pprof to Profiling signal.
1717
| <a id="pprof-mapping-has-inline-frames" href="#pprof-mapping-has-inline-frames">`pprof.mapping.has_inline_frames`</a> | ![Development](https://img.shields.io/badge/-development-blue) | boolean | Indicates that there are inline frames related to this mapping. | |
1818
| <a id="pprof-mapping-has-line-numbers" href="#pprof-mapping-has-line-numbers">`pprof.mapping.has_line_numbers`</a> | ![Development](https://img.shields.io/badge/-development-blue) | boolean | Indicates that there are line numbers related to this mapping. | |
1919
| <a id="pprof-profile-comment" href="#pprof-profile-comment">`pprof.profile.comment`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string[] | Free-form text associated with the profile. This field should not be used to store any machine-readable information, it is only for human-friendly content. | `["hello world", "bazinga"]` |
20+
| <a id="pprof-profile-doc-url" href="#pprof-profile-doc-url">`pprof.profile.doc_url`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Documentation link for this profile type. [1] | `http://pprof.example.com/cpu-profile.html` |
21+
| <a id="pprof-profile-drop-frames" href="#pprof-profile-drop-frames">`pprof.profile.drop_frames`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors. | `/foobar/` |
22+
| <a id="pprof-profile-keep-frames" href="#pprof-profile-keep-frames">`pprof.profile.keep_frames`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. | `/bazinga/` |
23+
24+
**[1] `pprof.profile.doc_url`:** The URL must be absolute and may be missing if the profile was generated by code that did not supply a link

model/pprof/common.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ groups:
1717
requirement_level: recommended
1818
- ref: pprof.profile.comment
1919
requirement_level: recommended
20+
- ref: pprof.profile.drop_frames
21+
requirement_level: recommended
22+
- ref: pprof.profile.keep_frames
23+
requirement_level: recommended
24+
- ref: pprof.profile.doc_url
25+
requirement_level: recommended

model/pprof/registry.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,29 @@ groups:
4444
examples:
4545
- ["hello world", "bazinga"]
4646
stability: development
47+
- id: pprof.profile.drop_frames
48+
brief: >
49+
Frames with Function.function_name fully matching the regexp will be
50+
dropped from the samples, along with their successors.
51+
type: string
52+
examples:
53+
- "/foobar/"
54+
stability: development
55+
- id: pprof.profile.keep_frames
56+
brief: >
57+
Frames with Function.function_name fully matching the regexp will be
58+
kept, even if it matches drop_frames.
59+
type: string
60+
examples:
61+
- "/bazinga/"
62+
stability: development
63+
- id: pprof.profile.doc_url
64+
brief: >
65+
Documentation link for this profile type.
66+
type: string
67+
note: >
68+
The URL must be absolute and may be missing if the profile was
69+
generated by code that did not supply a link
70+
examples:
71+
- "http://pprof.example.com/cpu-profile.html"
72+
stability: development

0 commit comments

Comments
 (0)