Skip to content
Open
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/pprof-profile.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: pprof

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: add various pprof attributes to support lossless conversion from and to OTel profiles.

# 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: [3078]

# (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:
6 changes: 6 additions & 0 deletions docs/general/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ They may be used in any Profiles record they apply to.
| [`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. | |
| [`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. | |
| [`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"]` |
| [`pprof.profile.default_sample_type`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Type of the preferred sample value. | `cpu` |
Copy link
Member

Choose a reason for hiding this comment

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

What attributes map will carry this attribute? Instrumentation scope?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ResourceProfiles.resource.attributes might be the best location to set this attribute.

| [`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` |
| [`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/` |
| [`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/` |

**[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

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand Down
6 changes: 6 additions & 0 deletions docs/registry/attributes/pprof.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ Attributes specific to pprof that help convert from pprof to Profiling signal.
| <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. | |
| <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. | |
| <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"]` |
| <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` |
| <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` |
| <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/` |
| <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/` |

**[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
8 changes: 8 additions & 0 deletions model/pprof/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ groups:
requirement_level: recommended
- ref: pprof.profile.comment
requirement_level: recommended
- ref: pprof.profile.drop_frames
requirement_level: recommended
- ref: pprof.profile.keep_frames
requirement_level: recommended
- ref: pprof.profile.doc_url
requirement_level: recommended
- ref: pprof.profile.default_sample_type
requirement_level: recommended
33 changes: 33 additions & 0 deletions model/pprof/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,36 @@ groups:
examples:
- ["hello world", "bazinga"]
stability: development
- id: pprof.profile.drop_frames
Copy link
Contributor Author

Choose a reason for hiding this comment

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

brief: >
Frames with Function.function_name fully matching the regexp will be
dropped from the samples, along with their successors.
type: string
examples:
- "/foobar/"
stability: development
- id: pprof.profile.keep_frames
Copy link
Contributor Author

Choose a reason for hiding this comment

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

brief: >
Frames with Function.function_name fully matching the regexp will be
kept, even if it matches drop_frames.
type: string
examples:
- "/bazinga/"
stability: development
- id: pprof.profile.doc_url
Copy link
Contributor Author

Choose a reason for hiding this comment

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

brief: >
Documentation link for this profile type.
type: string
note: >
The URL must be absolute and may be missing if the profile was
generated by code that did not supply a link
examples:
- "http://pprof.example.com/cpu-profile.html"
stability: development
- id: pprof.profile.default_sample_type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

brief: >
Type of the preferred sample value.
type: string
examples:
- "cpu"
stability: development
Loading