Skip to content

Commit ffbafc0

Browse files
committed
pprof: add profile attribute
Add pprof specific attributes to help convert pprof to OTel profiles and vice versa. Signed-off-by: Florian Lehner <[email protected]>
1 parent 90256e6 commit ffbafc0

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-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: []
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/registry/attributes/pprof.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ 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-default-sample-type" href="#pprof-profile-default-sample-type">`pprof.profile.default_sample_type`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string[] | Type of the preferred sample value. | `["cpu", "nanoseconds"]` |
21+
| <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. | `http://pprof.example.com/cpu-profile.html` |
22+
| <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/` |
23+
| <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/` |

model/pprof/registry.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,33 @@ 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+
examples:
68+
- "http://pprof.example.com/cpu-profile.html"
69+
stability: development
70+
- id: pprof.profile.default_sample_type
71+
brief: >
72+
Type of the preferred sample value.
73+
type: string[]
74+
examples:
75+
- ["cpu", "nanoseconds"]
76+
stability: development

0 commit comments

Comments
 (0)